"Unrecognized named-value: 'env'. Located at position 1 within expression" when used in reusable workflow jobs
@ericsciple is already working on this.
Since Sep 4, 2024.
- Dominant language
- C#
- Stars
- 6.3k
- Forks
- 1.4k
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 24
Description
Describe the bug
Usage of env in workflow that uses reusable workflow generates "Unrecognized named-value: 'env'. Located at position 1 within expression"
To Reproduce
Use the following yml:
name: Test Workflow
on:
push:
env:
SOMETHING: 1000
test:
name: call workflow
uses: ./.github/workflows/callee.yml
secrets: inherit
with:
run_url: "{run_url}"
message: ${{ env.SOMETHING }}
Expected behavior
env.SOMETHING is usable and can be passed into reusable workflow
Actual behavior
The workflow is not valid. .github/workflows/create-branch.yml (Line: #, Col: ##): Unrecognized named-value: 'env'. Located at position 1 within expression: env.SOMETHING
Runner Version and Platform
Version of your runner?
OS of the machine running the runner?
ubuntu-latest
What's not working?

Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.