ci: mint a GitHub App token for release-plz instead of using a PAT - #537
Draft
sd2k wants to merge 1 commit into
Draft
ci: mint a GitHub App token for release-plz instead of using a PAT#537sd2k wants to merge 1 commit into
sd2k wants to merge 1 commit into
Conversation
4 tasks
The GitHub credential release-plz uses is a static PAT stored in Vault at ci/repo/grafana/augurs/github:token, which expired around 2026-06-16. Rather than rotate it, mint an ephemeral GitHub App installation token with create-github-app-token, which authenticates to Vault over the same OIDC flow already used by get-vault-secrets. CARGO_REGISTRY_TOKEN stays in Vault — crates.io has no App-token equivalent — so both jobs keep the get-vault-secrets step for it. An App installation token (rather than the default GITHUB_TOKEN) is required because PRs opened with the default token cannot trigger other workflows, which would leave the release PR without CI. This cannot be merged yet: the GitHub App does not exist, so `github_app` is a placeholder. See #536 for the remaining setup. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
sd2k
force-pushed
the
ci/github-app-token-for-release-plz
branch
from
August 21, 2026 12:21
b813539 to
4980a1a
Compare
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.
Tracked by #536. Draft — cannot be merged as-is, see blockers below.
Stacked on #535; rebase onto
mainonce that lands. The diff shown here is againstfix/vault-secrets-env-wiring, so it contains only the credential change.What
Replace the static PAT at
ci/repo/grafana/augurs/github:tokenwith an ephemeral GitHub App installation token fromgrafana/shared-workflows/actions/create-github-app-token, which authenticates to Vault over the same OIDC flowget-vault-secretsalready uses. That PAT expired around 2026-06-16 (gh: Bad credentials (HTTP 401)), and we've moved away from PATs org-wide, so rotating it isn't the answer.CARGO_REGISTRY_TOKENstays in Vault viaget-vault-secrets— crates.io has no App-token equivalent — so both jobs keep that step, just with one fewer secret in it.Both jobs already declare
id-token: write, which is allcreate-github-app-tokenneeds, so no permission changes.Blockers
github_app: augurs-releaseis a placeholder and must be replaced with the real name; there's aTODOon both steps pointing at ci: replace the static GitHub PAT in Vault with a GitHub App token for release-plz #536. As written this workflow will fail to mint a token.contents: writeandpull_requests: write, installed ongrafana/augurs, and registering with Vault. If it's set up with a non-defaultpermission set, addpermission_set:to both steps.Why an App token rather than the default
GITHUB_TOKENrelease-plz opens the release PR, and PRs opened with the default
GITHUB_TOKENcannot trigger other workflows — CI would never run on the release PR. An App installation token isn't subject to that, which is why a PAT was used in the first place.Verification
Release-plzonly triggers on push tomain, so this can't be proven green from a PR — the first push tomainafter merge is the real test.actionlintis clean and the YAML parses to the expected values, which is as far as static checking goes here.Once this merges and a run is green,
ci/repo/grafana/augurs/github:tokencan be deleted from Vault.🤖 Generated with Claude Code