ci: push release bumps via a GitHub App token to satisfy branch protection#30
Merged
andrey-embarklabs merged 1 commit intoJun 16, 2026
Conversation
…ction The auto-bump commit is pushed back to main, which the branch ruleset rejects for the default github-actions bot. Authenticate the push as a GitHub App (a first-class ruleset bypass actor) via create-github-app-token. The OCI push still uses GITHUB_TOKEN, so the App needs only Contents: write. Requires secrets RELEASE_APP_CLIENT_ID and RELEASE_APP_PRIVATE_KEY and the App on the ruleset bypass list.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
When #21 merged,
release-ocicorrectly computed the major bump (1.1.0 -> 2.0.0) but failed to push it:mainis protected ("changes must be made through a pull request"), so the bump commit was rejected. The tag push isn't gated, so axnat-2.0.0tag leaked pointing at an unmerged commit (already cleaned up), and nothing was published.The default
GITHUB_TOKEN/github-actions[bot]is not a clean ruleset bypass actor. A GitHub App is, so this authenticates the push as an App.What changed
actions/create-github-app-token@v3.2.0and check out with it, sogit pushtomainauthenticates as the App.GITHUB_TOKEN, so the App needs only Contents: read-and-write, nothing else.Verified with actionlint (shellcheck at
--severity=error). This is inert until the secrets below exist, and merging it does not trigger a release (release-ociishelm/**-triggered).Required setup (repo admin, one-off)
NrgXnat/helm-charts.mainruleset's bypass list.RELEASE_APP_CLIENT_ID= the App's Client ID (from the App's General page, not the numeric App ID)RELEASE_APP_PRIVATE_KEY= the generated private key (full.pemcontents)To publish 2.0.0 after setup
Run
release-ocivia workflow_dispatch. With thexnat-2.0.0tag already removed, it recomputes the #21 commits (1.1.0 -> 2.0.0, major), commits the bump tomain, tagsxnat-2.0.0, and pushes the OCI artifact to GHCR. Then set the new package's visibility to Public and link it to this repo.