Skip to content

Use Global Environment Variables in with clause of workflow #25808

Discussion options

You must be logged in to vote

Embarassing…
A little further reading brought me to the solution which one can find here:
https://help.github.com/en/actions/automating-your-workflow-with-github-actions/contexts-and-expression-syntax-for-github-actions

It’s almost the same as with input variables which convert from ‘whateverMyVariable-NameIs’ to ‘INPUT_WHATEVERMYVARIABLE_NAMEIS’.
The same applies here: github.sha becomes GITHUB_SHA

with:
  ...
  extraVars: 'my_first_extra=${{ github.actor }} my_second_one=${{ github.sha }}'

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@PMorganCA
Comment options

Answer selected
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
Labels
None yet
3 participants