Skip to content

Accessing environment variable #26765

Answered by Simran-B
lzap asked this question in Actions
Discussion options

You must be logged in to vote

The if condition is syntactically wrong, the entire expression must be wrapped in ${{ }} or not at all.

But that aside, you cannot reference the env context here:

You can use the env context in the value of any key in a step except for the id and uses keys.

  <a href="https://docs.github.com/en/actions/learn-github-actions/contexts#env-context" target="_blank" rel="noopener nofollow ugc">GitHub Docs</a>

Contexts - GitHub Docs

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants