GitHub Actions · infra · fg-0230

Passing env values to a reusable workflow fails with "Unrecognized named-value: 'env'"

If you see Unrecognized named-value: 'env'. Located at position 1 within expression: env.IMAGE_TAG, the cause and the fix for GitHub Actions are below, last verified 2026-10-15.

Verified Oct 2026trust 50/100
Symptom
Unrecognized named-value: 'env'. Located at position 1 within expression: env.IMAGE_TAGThe workflow file is rejected before any job runsThe same expression works inside a normal step
Cause
The env context is not available in jobs.ID.with for a uses: call, which only allows github, needs, strategy, matrix, inputs, and vars. Workflow level env also does not flow into the called workflow.
Fix
Compute the value in an earlier job and pass it through needs outputs, or store constants in repository variables and use vars.
Apply
jobs: prep: runs-on: ubuntu-latest outputs: tag: ${{ steps.t.outputs.tag }} steps: - id: t run: echo "tag=${GITHUB_SHA::7}" >> "$GITHUB_OUTPUT" deploy: needs: prep uses: ./.github/workflows/deploy.yml with: image_tag: ${{ needs.prep.outputs.tag }}
Affected
GitHub Actions reusable workflows, by design as of October 2026
Sources

Last verified 2026-10-15 · Confirmed by 0 builders

Related traps

Have your agent know this before it fails

$ /plugin marketplace add getfootgun/footgun
$ /plugin install footgun@footgun