ci: use GitHub App token for release-please PRs - #120
Merged
Merged
Conversation
release-please currently uses the default GITHUB_TOKEN, so any release PR it opens is authored by github-actions[bot]. Events on GITHUB_TOKEN-authored PRs never trigger downstream pull_request workflows, so CI checks would never run on the release PR. Minting an installation token from the dougborg-release-please GitHub App (already installed and configured via the RELEASE_PLEASE_APP_ID variable and RELEASE_PLEASE_APP_PRIVATE_KEY secret) fixes this by making the app the PR author instead.
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
release.ymlcurrently runsgoogleapis/release-please-actionwith no explicittoken:, so it falls back to the defaultGITHUB_TOKEN. That means any release PR release-please opens is authored bygithub-actions[bot].GitHub does not trigger
pull_requestworkflows from events authored byGITHUB_TOKEN(to prevent recursive workflow loops). Concretely, this repo'sci.ymlrunscommitlint,fmt,schemas,test,audit,build, etc. onpull_request, none of which run automatically on a release-please PR today — if branch protection required any of these checks, the release PR could become impossible to merge without manually re-triggering CI.Note:
maincurrently has no branch protection configured on this repo (gh api repos/dougborg/AirHound/branches/main/protectionreturns 404), so this isn't fixing an active blocker right now — it's closing a gap that would otherwise bite the moment required status checks are turned on, and it also gives release PRs the same CI signal as any other PR in the meantime.What changed
dougborg-release-pleaseGitHub App (already installed on this repo; credentials already configured as theRELEASE_PLEASE_APP_IDvariable andRELEASE_PLEASE_APP_PRIVATE_KEYsecret — no secrets/variables were touched by this PR).googleapis/release-please-actionviatoken:.actions/create-github-app-tokentobcd2ba49218906704ab6c1aa796996da409d3eb1 # v3, consistent with this repo's SHA-pinning convention.build-releaseandpublish-releaseuntouched — artifact upload/download and thesoftprops/action-gh-releaserelease-asset publishing continue to useGITHUB_TOKENexactly as before. No package-registry or OIDC auth was touched.Reference implementation:
dougborg/harness-kit's.github/workflows/release-please.yml, adapted here to fit AirHound's multi-job artifact-build/publish structure (harness-kit's workflow only has the single release-please job).Test plan
actionlint .github/workflows/release.ymlpasses with no findingspushtomainshould open/update the release PR authored by thedougborg-release-please[bot]app instead ofgithub-actions[bot], and CI should run on that PR