ENV vars are missing from actions context #26866
-
TL:DR One of ENV vars is not dumping in github actions workflow, and I could not figure why. Currently, I’m working on integrating with our scripts GH Actions, and one task is to hand over environment variables to our deployment scripts so that Ansible can use it GHA workflow example:
Run results: Dump env context step, should contain |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
I believe it’s because the new environment variable defined in the step is not yet in env context at time of execution You can try |
Beta Was this translation helpful? Give feedback.
-
Hi @Troush, Glad to see you in Github Community Forum! The step level env only works in that step where it defines, it will not be added into GITHUB_CONTEXT. To add env to Github Context in step, please use “set-env” command:
Thanks |
Beta Was this translation helpful? Give feedback.
Hi @Troush,
Glad to see you in Github Community Forum!
The step level env only works in that step where it defines, it will not be added into GITHUB_CONTEXT.
But you can find it in ‘env’ setting, and use
$varname
to invoke it.To add env to Github Context in step, please use “set-env” command:
Thanks