ci: authenticate release pushes via GitHub App token#52
Merged
Conversation
Mints an installation token via actions/create-github-app-token@v3 and passes it to actions/checkout so subsequent git pushes inherit the App's auth. The App is in the ruleset bypass list, so direct pushes to main bypass the protection without disabling rules. Replaces the previous reliance on GITHUB_TOKEN, which cannot be added to bypass lists by design and was blocked by "Require code scanning results" on the version-bump and changelog-update pushes. Requires repo secrets RELEASE_APP_ID and RELEASE_APP_PRIVATE_KEY. https://claude.ai/code/session_01K8eXF8Fe3gjCR5e2ndU2Wo
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.
Summary
actions/create-github-app-token@v3to both release workflows to mint an installation token from thevault-cortex-releaseGitHub App.actions/checkout, sogit pushcalls later in the job use the App's auth.maingo through without disabling protection.Why
The default
GITHUB_TOKENcannot be added to ruleset bypass lists — by GitHub design, to prevent any workflow from circumventing protection. TheRequire code scanning resultsrule was the immediate blocker (catch-22: CodeQL only scans after a push lands onmain), butRequire a pull request before mergingandRequire status checks to passwould also block direct release pushes.A GitHub App with
Contents: writeis the official-recommended workaround. The App's installation token is treated as a separate actor that CAN be bypassed by ruleset, scoped per-App, rotatable, and auditable.Prerequisites (already configured)
vault-cortex-releasecreated withContents: read and writeandWorkflows: read and write, installed on this repo.RELEASE_APP_IDandRELEASE_APP_PRIVATE_KEYpopulated.mainbranch ruleset's bypass list.Affected workflows
manual_release.yml—bump-and-tagjob (push of version-bump commit + tag) andreleasejob (changelog push).auto_release.yml—releasejob (changelog push).Test plan
Manual Releasewithpatchbump → expect v0.15.2 to ship without touching ruleset rules.mainand the GitHub release is created.releasejob).https://claude.ai/code/session_01K8eXF8Fe3gjCR5e2ndU2Wo
Generated by Claude Code