ci: mint App token so commit-back can bypass branch protection (PoC) - #20
Merged
Conversation
PoC scaffolding only. The v1.5.0 release demonstrated the auto-release workflow runs to completion EXCEPT the final `git push` of the CHANGELOG commit-back, which hits GH006 (protected branch update failed) because the default GITHUB_TOKEN identity `github-actions[bot]` is not in the main-branch bypass list, and classic branch protection cannot bypass that built-in identity (only Repository Rulesets expose it). The existing `release-please-workflow` GitHub App is already in the bypass list with `contents: write`. Minting a short-lived installation token from it via `actions/create-github-app-token` and passing it to `actions/checkout` gives the commit-back step a bypass-listed identity to push as. No new secrets, no new App install -- the org-level `RELEASE_PLEASE_CLIENT_ID` / `RELEASE_PLEASE_PRIVATE_KEY` secrets are already visible to this repo. Test-only: longer-term plan is to migrate this repo's branch protection to a Ruleset that bypasses GitHub Actions directly, at which point this step goes away.
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
Fix the CHANGELOG.md commit-back failure observed on v1.5.0's release run by minting an installation token from the existing
release-please-workflowGitHub App (already bypass-listed) and passing it toactions/checkoutso the subsequentgit pushcarries a bypass-listed identity.This unblocks end-to-end validation of the auto-update-CHANGELOG.md design. PoC scaffolding only — the long-term plan is a Rulesets migration that bypasses GitHub Actions directly, at which point this step is deleted.
What changed
One new step + a
token:line on the existing checkout. No other workflow logic touched.Why this works
release-please-workflowApp (client_id: Iv23li4D87rTS1cOd8GQ) is in the branch-protection bypass list withcontents: write.actions/create-github-app-token@v3.2.0accepts the org-levelRELEASE_PLEASE_CLIENT_ID+RELEASE_PLEASE_PRIVATE_KEYsecrets that are already visible to this repo (no setup needed).actions/checkoutconfiguresgitwith that token, the subsequentgit pushinherits the bypass.Test plan
Merging this PR is itself the test:
ci:, which is grouped under "Changed" and bumps patch -> v1.5.1).gh release createsucceeds (same as v1.5.0).chore: update CHANGELOG.md for v1.5.1 [skip ci]commit lands on main.## [v1.5.1](compare/v1.5.0...v1.5.1) - 2026-06-03section is spliced directly under the<!-- auto-release: insert below -->marker.[skip ci]works).Note on permanent v1.5.0 gap: v1.5.0's CHANGELOG.md section was lost when its commit-back failed. After this PoC validates, we can either backfill v1.5.0 in a one-off PR, or accept that v1.5.0 lives only in the GitHub Releases page.
Out of scope