Skip to content

ci: add a dispatchable release and keep the README version in sync - #7

Merged
tada5hi merged 1 commit into
masterfrom
fix/release-recovery
Aug 4, 2026
Merged

ci: add a dispatchable release and keep the README version in sync#7
tada5hi merged 1 commit into
masterfrom
fix/release-recovery

Conversation

@tada5hi

@tada5hi tada5hi commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

The 0.2.0 release failed twice over, for two unrelated reasons.

1. publish: 422 Invalid target_commitish parameter

hevi invoked cr upload without --commit, so chart-releaser posted an empty target_commitish
and the GitHub API rejected the release (run 30939094583).
Filed and fixed upstream: tada5hi/hevi#60 / tada5hi/hevi#61. @v2 floats, so this repo picks the
fix up once that release lands.

Earlier runs were green only because --skip-existing skipped the already-released 0.1.0, so the
bug surfaced on the first version bump after the hevi migration.

Publishing was reachable only from a master push, leaving no way to retry after the version
bump had already merged. workflow_dispatch now provides that recovery path (dispatch on any ref;
Chart.yaml stays the version source, so no version input is needed). release-please is skipped on
the dispatch path, and publish gets an explicit condition because a skipped dependency would
otherwise skip it too. A concurrency group keeps a manual run from racing a push.

2. lint: helm-docs drift

release-please bumps Chart.yaml but not the generated README, whose badge still read 0.1.0, so
the drift gate failed. The README is now a release-please extra-files entry.

The version badge had to be hand-rolled rather than using chart.badgesSection, because
release-please's generic updater rewrites only the first semver on an annotated line:

  • the version appears exactly once, so the appVersion badge moved to its own line
  • the version is terminated by ? instead of the usual -informational color segment: the
    updater's regex reads 0.2.0-informational as version + prerelease and would drop the color

Verification

  • make test passes (lint, render matrix over every ci/*-values.yaml, values coverage)
  • make docs schema leaves a clean tree, so both CI drift gates pass
  • round-trip checked by simulating the updater's regex against the generated line at 0.3.0 and
    diffing it against what helm-docs actually emits for 0.3.0: byte-identical, so the next
    release-please PR will not re-break the drift gate

Summary by CodeRabbit

  • Release Automation

    • Added manual release triggering with concurrency protection.
    • Improved publishing recovery so releases can proceed when the automated release step is skipped or completes successfully.
  • Documentation

    • Updated Helm chart badges to display the current chart version, chart type, and application version.
    • Enabled automated updates to the chart README version information during releases.

Two independent failures broke the 0.2.0 release.

The publish job died in hevi with "422 Invalid target_commitish parameter":
chart-releaser posts an empty target_commitish unless --commit is passed, which
hevi never did (tada5hi/hevi#60, fixed by tada5hi/hevi#61). Publishing was only
reachable from a master push, so there was no way to retry it once the version
bump had already been merged. The release workflow now also accepts a
workflow_dispatch, with release-please skipped on that path, and a concurrency
group so a manual run cannot race a push.

The lint job died on helm-docs drift: release-please bumps Chart.yaml but not
the generated README, whose badge still advertised 0.1.0. The README is now a
release-please extra-file. Its generic updater rewrites only the first semver on
an annotated line, so the version badge is hand-rolled to carry the version
exactly once and to terminate it with "?" instead of the "-informational" color
segment, which the updater would otherwise swallow as a prerelease suffix.
Copilot AI lite review requested due to automatic review settings August 4, 2026 19:00
@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The release workflow now supports manual dispatches, concurrency control, and publishing after a skipped release-please job. Chart release metadata updates include README.md in release processing and add version markers to chart badges.

Changes

Release automation

Layer / File(s) Summary
Chart release metadata
release-please-config.json, charts/authup/README.md.gotmpl, charts/authup/README.md
The chart package manages README.md during releases. The template and README include release-please version markers and separate chart badges.
Manual release workflow
.github/workflows/release.yaml
The workflow supports manual dispatches and concurrency control. The release-please job runs only for pushes. The publish job runs after a skipped or successful release-please job.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: copilot

Sequence Diagram(s)

sequenceDiagram
  actor Operator
  participant GitHubActions
  participant releasePlease
  participant publish
  Operator->>GitHubActions: Manually dispatch workflow
  GitHubActions->>releasePlease: Skip job for non-push event
  GitHubActions->>publish: Run after skipped release-please job
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the two main changes: adding a dispatchable release workflow and synchronizing the README version.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/release-recovery

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@tada5hi
tada5hi merged commit 5d78505 into master Aug 4, 2026
3 of 5 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the release automation for the Authup Helm chart to make publishing recoverable via manual dispatch and to keep the generated chart README’s version badge in sync with Chart.yaml, preventing helm-docs drift failures during release-please bumps.

Changes:

  • Add workflow_dispatch support (with concurrency) to the release workflow so publishing can be re-run without a new commit.
  • Configure release-please to update an additional file (README.md) alongside Chart.yaml version bumps.
  • Hand-roll the chart README version badge template so release-please can reliably update it without interfering with the AppVersion badge.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
release-please-config.json Adds extra-files to keep a README updated during release-please version bumps.
charts/authup/README.md.gotmpl Replaces chart.badgesSection with a release-please-friendly version badge layout.
charts/authup/README.md Regenerates README to match the new badge layout and updated chart version.
.github/workflows/release.yaml Adds manual dispatch + concurrency and adjusts job conditions so publish can run when release-please is skipped.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

needs: release-please
# release-please is skipped on workflow_dispatch, and a skipped dependency
# would skip this job too without an explicit condition.
if: ${{ !cancelled() && needs.release-please.result != 'failure' }}

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/release.yaml:
- Around line 7-10: Restrict the workflow_dispatch recovery path in the release
workflow to trusted release refs before any publishing occurs. Update the
manual-run flow around actions/checkout and hevi so it validates the selected
github.ref and commit against the protected release branch or otherwise requires
the repository’s approved release environment, while leaving the automated
release-please path unchanged.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 2f4f3c54-c1d9-413a-8608-571504bc1674

📥 Commits

Reviewing files that changed from the base of the PR and between 5ac3380 and 96477bd.

📒 Files selected for processing (4)
  • .github/workflows/release.yaml
  • charts/authup/README.md
  • charts/authup/README.md.gotmpl
  • release-please-config.json

Comment on lines +7 to +10
# Re-run the publish step for whatever Chart.yaml currently holds, without a new
# commit: the recovery path when a publish failed on its own (a broken releaser,
# an API hiccup) after release-please already merged the version bump.
workflow_dispatch:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟠 Major | 🏗️ Heavy lift

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== release workflow =="
if [ -f .github/workflows/release.yaml ]; then
  cat -n .github/workflows/release.yaml
else
  echo "missing .github/workflows/release.yaml"
fi

echo
echo "== workflow files =="
git ls-files .github/workflows

Repository: authup/helm

Length of output: 3042


🌐 Web query:

GitHub Actions manually run workflow workflow_dispatch branches tags action context github.ref GITHUB_ACTOR can only run workflows in trusted branches

💡 Result:

When using the workflow_dispatch event to manually trigger a GitHub Actions workflow, the workflow file must exist on the default branch of the repository [1][2]. This is a fundamental requirement for the workflow to be discoverable and manually triggerable via the GitHub UI, API, or CLI [1]. Regarding the concept of "trusted branches," this aligns with the recently introduced "Workflow execution protections" feature (available as of June 2026) [3]. These protections allow enterprise and repository administrators to define policies that restrict who can trigger workflows and which events are permitted [4][3]. Specifically, these policies can: 1. Limit workflow_dispatch triggers to specific roles (e.g., maintainers) to prevent unauthorized manual execution [4][3]. 2. Block untrusted actors from triggering workflows [4][3]. 3. Apply central policies that override individual workflow configurations [4][3]. While workflow_dispatch itself requires the workflow file to be on the default branch to function, the execution of the workflow can be further constrained by these administrative rules, which function as an "allow list" to ensure only trusted users or events can initiate specific workflows [4][3]. For context on the variables mentioned: - github.ref: This context variable provides the fully formed ref (branch or tag) that triggered the workflow run [5]. - GITHUB_ACTOR: This environment variable identifies the user or app that initiated the workflow [6]. If you are experiencing issues with workflows running on non-default branches, ensure the workflow file is present on the default branch and that your organization or repository policies do not restrict the workflow_dispatch event for your user role [1][4].

Citations:


🌐 Web query:

GitHub Actions manually run workflow run workflow branch tag default branch checkout publish default branch

💡 Result:

To manually trigger a GitHub Actions workflow, you must use the workflow_dispatch event trigger in your workflow file [1][2]. According to official documentation, this event trigger only functions when the workflow file exists on the default branch of the repository [1][2]. Key details regarding manual workflows include: 1. Manual Triggering: Once configured with workflow_dispatch, you can manually run the workflow via the GitHub UI (Actions tab), GitHub CLI, or REST API [1][3]. 2. Branch/Tag Selection: When manually triggering a workflow via the GitHub UI, you can select the specific branch or tag you wish to run the workflow against using the Branch dropdown menu [1][3]. Similarly, when using the GitHub CLI or REST API, you specify the target ref (branch or tag) as a parameter [1][4]. 3. Checking Out Code: Within your workflow steps, you typically use the actions/checkout action [5]. By default, this action checks out the code from the reference (branch, tag, or SHA) that triggered the workflow [5]. If no specific ref is provided, it defaults to the repository's default branch [5]. While official documentation states the workflow file must reside on the default branch to be triggerable via workflow_dispatch [1][2], community workarounds often involve ensuring the workflow has run at least once on the default branch (e.g., via other triggers) to register it with the GitHub Actions system [6]. Always ensure your workflow includes the checkout step if you need to interact with the repository's source code for the selected branch or tag [5].

Citations:


Authorization Bypass (CWE-862): Missing Authorization

Reachability: External

Gate manual publication to trusted refs.

workflow_dispatch can target any selectable branch or tag. On manual run, release-please is skipped, actions/checkout checks out the selected github.ref, and hevi publishes that chart contents with write-access GITHUB_TOKEN. Restrict manual runs to protected release refs, validate the selected commit against a trusted branch before publishing, or require environment approval.
[security_and_privancy]

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/release.yaml around lines 7 - 10, Restrict the
workflow_dispatch recovery path in the release workflow to trusted release refs
before any publishing occurs. Update the manual-run flow around actions/checkout
and hevi so it validates the selected github.ref and commit against the
protected release branch or otherwise requires the repository’s approved release
environment, while leaving the automated release-please path unchanged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants