Accessing dynamic variable name in github actions #25634
-
I want to access value of dynamic variable name which in effect is c_ip1, c_ip2 How do I construct this in github actions workflow ? val=“needs.build.outputs.c_ip$ip”
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
GHA contexts are only accessible in workflow expressions
|
Beta Was this translation helpful? Give feedback.
-
Thanks it worked. Able to fetch the values. |
Beta Was this translation helpful? Give feedback.
GHA contexts are only accessible in workflow expressions
${{ }}
. Mixing them with shell commands like that will not work. I think you should do this:echo ${{ needs.build.outputs[format('c_ip{0}', matrix.index)] }}