Skip to content

v4 CI broken: vars context used inside a composite action (build-and-test/action.yml) — every consumer's CI fails template validation #275

Closed

Description

@Shinrai

Summary

The @v4 composite action .github/actions/npm/jobs/build-and-test/action.yml references vars.CLDMV_SKIP_FROZEN_LOCKFILE in a step env: block. The vars context is not available inside composite actions (GitHub exposes vars only in workflow files), so the action fails template validation and the 🏗️ Build & Test job dies before running anything. The ✅ Required PR Check mirror then sees CI_RESULT=failure and goes red.

This breaks CI on every consumer repo that uses the v4 reusable CI, not one repo — it started when the @v4 rolling tag moved to a commit that added the frozen-lockfile mechanism.

Exact error

CLDMV/.github/v4/.github/actions/npm/jobs/build-and-test/action.yml (Line: 70, Col: 37):
Unrecognized named-value: 'vars'. Located at position 1 within expression: vars.CLDMV_SKIP_FROZEN_LOCKFILE
GitHub.DistributedTask.ObjectTemplating.TemplateValidationException: The template is not valid.
...
Failed to load CLDMV/.github/v4/.github/actions/npm/jobs/build-and-test/action.yml

Observed on a consumer PR run: 🧪 CI Tests & Build (push event) → job 🏗️ Build & Test (lts/*) errors at load time; job ✅ Required PR Check then exits 1 with Reusable CI did not pass. (CI_RESULT=failure). The run resolved CLDMV/.github@v4 at a newer SHA (3927509…) than the workflow files it started from (0156a0b…), i.e. the tag move introduced it.

Offending code

.github/actions/npm/jobs/build-and-test/action.yml:

    - name: Install dependencies
      uses: CLDMV/.github/.github/actions/npm/steps/install-dependencies@v4
      env:
        CLDMV_SKIP_FROZEN_LOCKFILE: ${{ vars.CLDMV_SKIP_FROZEN_LOCKFILE }}   # ← `vars` not available in a composite action
      with:
        package-manager: ${{ inputs.package-manager }}

Fix

vars must be read in a workflow file (which has the vars context) and threaded down into the composite as an input:

  1. Add an input to build-and-test/action.yml:
    inputs:
      skip-frozen-lockfile:
        description: "Value of the CLDMV_SKIP_FROZEN_LOCKFILE repo/org variable (passed from the calling workflow, which has the vars context)."
        required: false
        default: ""
    and change the env to reference it:
          env:
            CLDMV_SKIP_FROZEN_LOCKFILE: ${{ inputs.skip-frozen-lockfile }}
  2. In the reusable workflow(s) that call this composite (reusable-build-and-test.yml, and any other caller), pass:
          with:
            skip-frozen-lockfile: ${{ vars.CLDMV_SKIP_FROZEN_LOCKFILE }}

Also check

Any other composite action.yml that reads vars.CLDMV_SKIP_FROZEN_LOCKFILE (or any vars.*) directly has the same defect — e.g. the deeper .github/actions/npm/steps/install-dependencies action if it references vars internally. Grep the actions tree for vars. and thread each through inputs the same way. A workflow-level env: set once from vars and inherited by the composite steps is an alternative to per-action inputs.

Impact / severity

High — all v4 consumers' CI is red until this lands, and the ✅ Required PR Check being required means PRs can't merge. A revert of the tag move or a hotfix on @v4 unblocks everyone.

Activity

  1. added
    type: bug
    priority: critical
    type: ci
    status: in progress
    on Sep 6, 2026
  2. added theissue type on Sep 6, 2026
  3. Shinrai commented on Sep 6, 2026

    @Shinrai
    ContributorAuthor

    Confirmed. Four composite actions set CLDMV_SKIP_FROZEN_LOCKFILE: ${{ vars.CLDMV_SKIP_FROZEN_LOCKFILE }} on their install-dependencies step, and vars isn't available inside composite actions — so all four fail template validation (Unrecognized named-value: 'vars'), not just build-and-test:

    • .github/actions/npm/jobs/build-and-test/action.yml
    • .github/actions/github/jobs/create-release/action.yml
    • .github/actions/github/jobs/create-release-pr/action.yml
    • .github/actions/github/jobs/update-release-pr/action.yml

    Fixed in #276 along the lead approach here: each composite now declares a skip-frozen-lockfile input and sets the step env from inputs.skip-frozen-lockfile; the eight calling workflow sites (which do have the vars context) pass vars.CLDMV_SKIP_FROZEN_LOCKFILE into it. install-dependencies still reads the value from process.env, so frozen-by-default behavior is unchanged. The source-only satellite create-release call installs no dependencies (install-dependencies is gated on release-source-only == 'false'), so it was intentionally left without the input.

    Grep confirms no vars. reference remains in .github/actions/. The PR merges into next; the @v4 tag rolls when it releases to master.

  4. cldmv-bot commented on Sep 6, 2026

    @cldmv-bot
    Contributor

    Closed in v4.26.1 — resolved by #276.

  5. added
    status: verified
    and removed
    status: in progress
    on Sep 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: criticalstatus: verifiedtype: bugtype: ci

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions