Exporting GitHub output parameters
You can use GitHub output parameters
Note
Another word for output parameter is variable. Because GitHub uses the term output parameter in its documentation, we'll use this term too.
Use the following instructions to export a GitHub output parameter from a GitHub Action so that it is available for use by other CodeCatalyst workflow actions.
To export a GitHub output parameter
-
Open a workflow and choose Edit. For more information, see Creating a workflow.
-
In the GitHub Actions action that generates the output parameter that you want to export, add an
Outputs
section with an underlyingVariables
property that looks like this:Actions: MyGitHubAction: Identifier: aws/github-actions-runner@v1 Outputs: Variables: - '
step-id
_output-name
'Replace:
-
step-id
with value of theid:
property in the GitHub action'ssteps
section. -
output-name
with the name of the GitHub output parameter.
Example
The following example shows you how to export a GitHub output parameter called
SELECTEDCOLOR
.Actions: MyGitHubAction: Identifier: aws/github-actions-runner@v1 Outputs: Variables: - 'random-color-generator_SELECTEDCOLOR' Configuration: Steps: - name: Set selected color run: echo "SELECTEDCOLOR=green" >> $GITHUB_OUTPUT id: random-color-generator
-