Skip to content

ci(sync-on-release): open a chart bump PR instead of pushing to protected main - #17

Merged
ferhimedamine merged 1 commit into
mainfrom
claude/sync-on-release-pr
Oct 22, 2026
Merged

ferhimedamine merged 1 commit into
mainfrom
claude/sync-on-release-pr

Conversation

@ferhimedamine

Copy link
Copy Markdown
Contributor

After every Dakera server release, sync-on-release.yml pushed the chart bump straight to main. main is protected (changes go through a reviewed PR), so for v0.12.3 it failed with GH006: Protected branch update failed. #16 had already done that bump.

Now: the workflow opens a PR from chore/chart-sync-<version>. Merging that PR publishes the chart, because helm-release and helm-publish-oci run on charts/** pushes to main (as they did when #16 merged).

  • No duplicate or wrong PRs: it skips when the chart is already at that version, when the bump would be a downgrade, or when an open PR already sets that appVersion (a release PR like release: chart 0.12.3 (Dakera server v0.12.3, dashboard 0.5.2) + hardening #16).
  • Never points at a missing image: it checks that ghcr.io/dakera-ai/dakera:<version> is published.
  • Complete bump: version, appVersion, the artifacthub image annotation (the old version left it stale), a fresh artifacthub.io/changes, and a CHANGELOG entry.
  • Input safety: the dispatch payload goes through env: and must be X.Y.Z. Before, it was pasted into the script.
  • CI runs on the PR: GH_PAT_PACKAGES pushes the branch and opens the PR, so Chart CI runs. A GITHUB_TOKEN PR would not run it, and this repository doesn't let Actions open PRs anyway.
  • dry_run input (manual runs): runs the whole path, opens the PR as a draft, then closes it and deletes its branch.

Tested:

  • The bump script was run locally on the real Chart.yaml and CHANGELOG.
  • The version check was exercised with a newer version, the same version, a downgrade and malformed input.
  • actionlint 1.7.7 (with shellcheck) is clean.
  • A dry_run dispatch on this branch is recorded below.

🤖 Generated with Claude Code

main is protected (changes through a reviewed PR), so the bump this workflow
pushed after every server release was refused (v0.12.3: "GH006: Protected
branch update failed"). It now opens a PR from chore/chart-sync-<version>;
merging it publishes the chart through helm-release / helm-publish-oci, which
run on charts/** pushes to main.

- Skips when the chart is already at the version, when it would downgrade, or
  when an open PR already sets that appVersion (a hand-written release PR).
- Checks the server image is published; also bumps the artifacthub image
  annotation, replaces the changes annotation and adds a CHANGELOG entry.
- The dispatch payload goes through env and must be X.Y.Z (it was pasted into
  the script).
- GH_PAT_PACKAGES pushes and opens the PR, so Chart CI runs on it.
- dry_run (manual): opens the PR as a draft, then closes it and deletes the
  branch, to check the path end to end.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ferhimedamine
ferhimedamine merged commit 7555dec into main Oct 22, 2026
1 check passed
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.

1 participant