Use Global Environment Variables in with clause of workflow #25808
-
I’m currently writing an action that can execute ansible playbooks. Due to the fact that it’s not possible to pass arrays into the dockerfile I need to do a workaround.
This doesn’t work out for me because the workflow is complaining like this:
What am I doing wrong? How can i use global environment variables as “with” variable? I know that it’s possible to use secrets like |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Embarassing… It’s almost the same as with input variables which convert from ‘whateverMyVariable-NameIs’ to ‘INPUT_WHATEVERMYVARIABLE_NAMEIS’.
|
Beta Was this translation helpful? Give feedback.
-
We appreciate you coming back and sharing @ppoetz, this post might help another user in the future. In the meantime, we’re looking forward to seeing you around! |
Beta Was this translation helpful? Give feedback.
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