Repository navigation
Release workflow: drop reserved GITHUB_ env overrides - #4
Merged
Merged
Conversation
workflow_dispatch runs failed with startup_failure (run 43095373081) because the Cut release step set GITHUB_SHA and GITHUB_REF_NAME in its env block; the GITHUB_ prefix is reserved. The runner defaults already carry exactly those values for the dispatched ref, so drop the overrides. The cut-release.sh script reads GITHUB_SHA / GITHUB_REPOSITORY from the runner defaults, which is what it required all along.
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
Removes the
GITHUB_SHA/GITHUB_REF_NAMEstep-env overrides from the Release workflow's "Cut release" step.The
GITHUB_prefix is reserved for GitHub-provided variables; the runner already setsGITHUB_SHA(dispatched ref's HEAD),GITHUB_REPOSITORY, andGITHUB_REF_NAMEto exactly the values the script requires, so the overrides are unnecessary and against documented usage.Honest framing
The original dispatch of the Release workflow (and a follow-up on this branch) failed with
startup_failure, and I initially blamed these overrides. A bisect then showed even a minimalworkflow_dispatch+echoworkflow failed the same way, so the trigger failures were caused by the org-side "Actions cannot trigger pipelines" condition, not this file — the override was masked, not proven guilty. Still, removing it is correct per the reserved-prefix docs, and one fewer thing to rule out when Actions is healthy again.Verified
actionlint .github/workflows/release.ymlclean.cut-release.sh --dry-runagainst current main still derives v0.2.0 with identical notes (the script readsGITHUB_SHA/GITHUB_REPOSITORYfrom runner defaults, which is what it always required).a0cbdccusing this same script — tags, movingv1, release notes all correct: https://github.com/stackgenhq/cce-action/releases/tag/v0.2.0After merge
Once the org's Actions triggering works again, dispatching the Release workflow on main should go through the green-Self-test gate and the normal path; this change removes a reserved-env footgun from that path.