How do I refer to env context in a workflow file? #25759
-
I’m banging my head against the desk trying to figure out the correct syntax for my workflow YAML. I am using a container on a self-hosted runner and I would like to specify the hostname for the container. This works:
However I want to specify it dynamically by setting hostname to the value of GITHUB_RUN_NUMBER and I can’t figure out how to do it. This:
just sets hostname to the literal value “$GITHUB_RUN_NUMBER”, here is what gets returned from running So I tried this instead:
but that just caused an error when attempting to start the workflow:
Please can someone tell me the correct syntax to refer to env vars in |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
You don’t. The
|
Beta Was this translation helpful? Give feedback.
-
got it, thank you. I have gotten around this by providing the GITHUB_RUN_NUMBER as an output from a previous job:
|
Beta Was this translation helpful? Give feedback.
got it, thank you. I have gotten around this by providing the GITHUB_RUN_NUMBER as an output from a previous job: