fix(generate): pass github.token to setup-cli so cold-cache CLI download authenticates - #277
Merged
Merged
Conversation
…oad authenticates The generated preview, merge-queue, validate-check, drift-check, and hotfix workflows invoked setup-cli without a token input, leaving GH_TOKEN empty. On a cold Actions tool-cache the setup-cli action falls back to gh release download, which then exits 4 (empty token) and reds the fleet reconcile gate. Pass the built-in github.token, sufficient to authenticate against the public stablekernel/cascade releases. Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
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.
Problem
The generated preview, merge-queue, validate-check, drift-check, and hotfix workflows invoked the
setup-clicomposite action with only aversion:input and notoken:.setup-clisetsGH_TOKEN: ${{ inputs.token }}, so the token was empty. On a cold Actions tool-cache the action falls back togh release download, which then exits 4 (GH_TOKEN: (empty)). A live fleet run (v0.4.0-rc.3) caught this: the 2env suite's PR-preview run failed at Setup CLI on a freshly-cut rc tag, reding the reconcile gate. The bug was latent in five generators; 2env just hit a cold cache first.Fix
All five generators now emit
token: ${{ github.token }}in the setup-cliwith:block. The built-in Actions token authenticatesgh release downloadagainst the publicstablekernel/cascadereleases and needs no adopter configuration. Purely additive (93 insertions, 0 deletions); generated YAML stays valid (existing ValidYAML tests pass).Verification
TestXxx_SetupCLIPassesToken) RED before the fix, GREEN after.go build ./...,go test ./internal/generate/...(471 pass),golangci-lint run ./internal/generate/...(0 issues) all green.