-
I want to set env variables based on input parameter. However, the variables are not available in steps following the definitions.
Variables set in above steps are not listed. It always fails to access any of the variables defined in the block. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Resolved it with following approach:
Thanks to examples in Go crazy with GitHub Actions - Sander Knape |
Beta Was this translation helpful? Give feedback.
-
Your problem in the original attempt is in this code:
(and the same in the
it would have been a little more obvious where it was going wrong. To substitute the value of the input into the script, you need to do like
Although personally I’m always wary of substituting text directly into the bash script, as it seems too easy to accidentally break if the value is ever something unexpected. So I’d prefer to do like
|
Beta Was this translation helpful? Give feedback.
Resolved it with following approach:
Thanks to examples in Go crazy with GitHub Actions - Sander Knape