"Unrecognized named-value: 'env'. Located at position 1 within expression" when used in reusable workflow jobs
See original GitHub issueDescribe 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?
Issue Analytics
- State:
- Created 8 months ago
- Reactions:60
- Comments:28
Top Results From Across the Web
Environment variables in github actions
The error Unrecognized named-value: 'env' is telling you that GitHub is not recognizing the YAML you wrote at line 13. It's a syntax...
Read more >Passing values between steps in Github Actions
This creates an environment variable called TERMINUS_RELEASE that is accessible by any step after this one either directly within a script ( $ ......
Read more >GitHub Actions - Is it possible to use event inputs in jobs.id. ...
According to the workflow syntax it's possible to do this: on: ... Located at position 1 within expression: github.event.inputs.src_ref.
Read more >Simplify using secrets with reusable workflows
GitHub Actions simplifies using secrets with reusable workflows with the secrets: inherit keyword. Previously when passing secrets to a ...
Read more >Untitled
DOCKER_USERNAME. github / workflows / cicd. yaml (Line: 22, Col: 24): Unrecognized named-value: 'secrets'. Located at position 1 within expression: secrets ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I guess I wasted 30 mins of my life and ended up here like the rest of us
+1. Get this fixed github, cmon.