fix: re-mint GitHub App token before goreleaser to avoid mid-run expiry - #281
Merged
Andriy Knysh (aknysh) merged 1 commit intoSep 4, 2026
Merged
Conversation
GitHub App installation tokens are hard-capped at 1 hour and cannot be extended. The goreleaser job minted its token once at job start, then handed it straight to a `goreleaser release --timeout 180m` invocation whose own runtime (build + sign + SBOM + publish across every platform target) has been climbing past 1 hour on recent atmos runs (44m -> 53m -> 1h5m52s), so the token is already expired by the time goreleaser reaches its final publish-phase API calls. That surfaces as an unrelated-looking `401 Bad credentials` when goreleaser tries to list/delete existing draft releases, not an error about the release content itself. Mint a second, fresh App token immediately before the "Run GoReleaser" step (after all the setup/GPG/disk-cleanup steps that otherwise eat into the original token's lifetime before goreleaser even starts), and use it for both the GoReleaser invocation and the immediately-following build-provenance attestation step.
Erik Osterman (Cloud Posse) (osterman)
requested review from
a team
as code owners
September 4, 2026 21:57
|
Important Cloud Posse Engineering Team Review RequiredThis pull request modifies files that require Cloud Posse's review. Please be patient, and a core maintainer will review your changes. To expedite this process, reach out to us on Slack in the |
Andriy Knysh (aknysh)
approved these changes
Sep 4, 2026
Andriy Knysh (aknysh)
deleted the
osterman/fix-goreleaser-app-token-expiry
branch
September 4, 2026 22:51
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.
what
shared-go-auto-release.yml'sgoreleaserjob, mint a second, freshGitHub App installation token immediately before the "Run GoReleaser" step
(after all the setup/GPG-import/disk-cleanup steps), instead of reusing the
single token minted at the very start of the job.
immediately-following "Attest build provenance" step.
why
extended or refreshed — that's a GitHub API limit, not something
configurable in this workflow.
goreleaser release --timeout 180minvocation. GoReleaser's own reportedbuild+sign+SBOM+publish runtime for
atmoshas been climbing on recentruns — 44m14s -> 53m14s -> 1h5m52s — and is now routinely exceeding that
1-hour token ceiling.
(listing/deleting existing draft releases before creating the new one)
fails with a
401 Bad credentials, e.g.:expired token — confirmed by cross-referencing
actions/create-github-app-token'sdocumented 1-hour installation-token TTL against goreleaser's own
self-reported elapsed time in the failing runs.
token has before goreleaser needs it, without touching goreleaser's own
build/sign/SBOM/publish logic at all.
references
cloudposse/atmosPR #2926 (labeledrelease/feature,which triggers this shared workflow via
feature-release.ymlon everypush): https://github.com/cloudposse/atmos/actions/runs/33914587913/job/101158920515
GITHUB_TOKENenv var or atoken file) — it has no native GitHub App auth or internal token-refresh,
so the fix has to live on the workflow side:
https://goreleaser.com/scm/github/
https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/authenticating-as-a-github-app-installation