Repository navigation
fix: stop composite actions referencing vars - #40
Merged
Merged
Conversation
Composite actions have no `vars` context (and no `secrets` context), so GitHub rejected actions/purview-release with "Unrecognized named-value: 'vars'" while loading the action. No consumer release could run, and actionlint does not catch it because it only parses workflow files. Take the four repository variables as inputs instead: source-mapping, github-packages, github-packages-keep-versions and github-packages-retention-hours. The calling workflow, which does have `vars`, passes them through, so the opt-in and retention semantics are unchanged. .github/actions/purview-build/action.yml had the same latent bug for PURVIEW_NUGET_SOURCE_MAPPING; it is fixed the same way. Add a test that fails when any composite action references `vars` or `secrets`, so the next manifest-level context mistake fails in CI rather than in a consumer's release.
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.
Composite actions have no
varscontext, so GitHub rejectedactions/purview-releasewithUnrecognized named-value: 'vars'while loading the action — no consumer release could run.The four repository variables are now passed in as inputs (
source-mapping,github-packages,github-packages-keep-versions,github-packages-retention-hours) by the calling workflow, which does havevars..github/actions/purview-buildhad the same latent bug forPURVIEW_NUGET_SOURCE_MAPPING.A test now fails when any composite action references
varsorsecrets. actionlint only parses workflow files, which is why this reached main.Validation:
just lint-check,just lint-yaml, andjust test(92 + 449 + 9 tests) pass locally.