ci(flake-update): use a GitHub App token instead of a PAT#1
Merged
Conversation
Mint a short-lived (~1h) GitHub App installation token (actions/create-github-app-token, pinned to v3.2.0) for the weekly flake.lock PR instead of a long-lived PAT: no token expiry to silently break the cron run, 1h-scoped tokens rather than a stored secret, and PRs come from the org App identity, not a personal account. Still not GITHUB_TOKEN, so the bot's PR triggers `check`. Drop the job's GITHUB_TOKEN perms to contents:read (the App token does the branch push + PR creation). Requires repo config before the next run: a GitHub App (Contents RW + Pull requests RW) installed on this repo, App ID in the `APP_ID` variable + private key in the `APP_PRIVATE_KEY` secret. Co-authored-by: Claude <noreply@anthropic.com>
Contributor
Author
|
boot.sh N/A |
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.
Mint a short-lived (~1h) GitHub App installation token (actions/create-github-app-token, pinned to v3.2.0) for the weekly flake.lock PR instead of a long-lived PAT: no token expiry to silently break the cron run, 1h-scoped tokens rather than a stored secret, and PRs come from the org App identity, not a personal account. Still not GITHUB_TOKEN, so the bot's PR triggers
check. Drop the job's GITHUB_TOKEN perms to contents:read (the App token does the branch push + PR creation).Requires repo config before the next run: a GitHub App (Contents RW + Pull requests RW) installed on this repo, App ID in the
APP_IDvariable + private key in theAPP_PRIVATE_KEYsecret.What & why
Checklist
CI runs
nix flake check(host-side guarantees, guest build, shellcheck) automatically. Thefull-boot smoke test (
tests/boot.sh) needs a real VM and is not in CI — so if your changetouches the guest, wrapper, or boot path, you must run it locally on a Nix+KVM box and paste
the result here. (See CLAUDE.md → "Definition of done".)
nix flake checkis green (CI on this PR, or run locally)bash tests/boot.shon a Nix+KVM box — pasted theN passed, M failedline below; or N/A (docs / CI-only change, no guest/wrapper/boot impact)ssh -tt)? Did a humanccvm --shellpass — resize,vim,less, vi-mode — since terminal fidelity isn't automatedCo-authored-by: Claude <noreply@anthropic.com>