Skip to content

fix: stop composite actions referencing vars - #40

Merged
kieronlanning merged 1 commit into
mainfrom
fix/composite-action-contexts
Nov 2, 2026
Merged

kieronlanning merged 1 commit into
mainfrom
fix/composite-action-contexts

Conversation

@kieronlanning

Copy link
Copy Markdown
Contributor

Composite actions have no vars context, so GitHub rejected actions/purview-release with Unrecognized 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 have vars. .github/actions/purview-build had the same latent bug for PURVIEW_NUGET_SOURCE_MAPPING.

A test now fails when any composite action references vars or secrets. actionlint only parses workflow files, which is why this reached main.

Validation: just lint-check, just lint-yaml, and just test (92 + 449 + 9 tests) pass locally.

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.
@kieronlanning
kieronlanning merged commit d00b005 into main Nov 2, 2026
1 check passed
@kieronlanning
kieronlanning deleted the fix/composite-action-contexts branch November 2, 2026 22:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant