- 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