It is common to define and use dynamic variables in GitHub actions. Typical use cases are labelling docker images or generating artifact names. This note outlines the steps required to achieve the goal.
The key points to remember
- The step that shares a value must have the property
id
set to be referenced by the rest of the steps - It is possible to print the context, and it makes it easier to troubleshoot
|
|
Troubleshooting
Dumping the value in JSON format makes troubleshooting an easy task. The line 11 the snippet above will produce the following data.
|
|