Skip to content

fix(generate): pass github.token to setup-cli so cold-cache CLI download authenticates - #277

Merged
joshua-temple merged 1 commit into
mainfrom
fix/preview-setup-cli-token
Jun 24, 2026
Merged

joshua-temple merged 1 commit into
mainfrom
fix/preview-setup-cli-token

Conversation

@joshua-temple

Copy link
Copy Markdown
Collaborator

Problem

The generated preview, merge-queue, validate-check, drift-check, and hotfix workflows invoked the setup-cli composite action with only a version: input and no token:. setup-cli sets GH_TOKEN: ${{ inputs.token }}, so the token was empty. On a cold Actions tool-cache the action falls back to gh 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-cli with: block. The built-in Actions token authenticates gh release download against the public stablekernel/cascade releases and needs no adopter configuration. Purely additive (93 insertions, 0 deletions); generated YAML stays valid (existing ValidYAML tests pass).

Verification

  • New per-generator unit tests (TestXxx_SetupCLIPassesToken) RED before the fix, GREEN after.
  • e2e scenario assertions added for preview/merge-queue/validate-check (string-contains style); drift-check/hotfix covered by unit tests.
  • go build ./..., go test ./internal/generate/... (471 pass), golangci-lint run ./internal/generate/... (0 issues) all green.

…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>
@joshua-temple
joshua-temple merged commit a5265e8 into main Jun 24, 2026
13 checks passed
@joshua-temple
joshua-temple deleted the fix/preview-setup-cli-token branch June 24, 2026 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant