fix(qa): the headless host action does not need a secret - #38
Merged
Conversation
chuzz is public, so `actions/checkout` reaches it with the workflow's own
`github.token`. The action nonetheless declared `token` as `required: true`,
so every caller had to name a secret to clone a public repository, and the
repositories that did not have `SIBLING_REPOS_TOKEN` passed the empty string.
The action then failed before its first step with
Input required and not supplied: token
which names the input rather than the missing secret, and reads as a broken
action rather than an unset repository secret.
`token` is now optional, and the checkout falls back to `github.token` when
the input is empty, so a caller that still passes an unset secret works too.
That matters here: fifteen callers already pass one.
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.
Every consumer of
headless-host@masterfails at its first step:chuzz is public.
actions/checkoutreaches it with the workflow's owngithub.token; no PAT was ever needed. But the action declaredtokenasrequired: true, so each caller had to name a secret, and repositories withoutSIBLING_REPOS_TOKEN(ui and honey.id among them, verified) passed the empty string.Two changes:
tokenis optional, and the checkout uses${{ inputs.token || github.token }}so the fifteen callers already passing an unset secret keep working without edits.This unblocks ui #289, honey.id #332, ps-observability #19 and the twelve site PRs, all of which fail here and nowhere else.