Exporting GitHub output parameters - Amazon CodeCatalyst

Exporting GitHub output parameters

You can use GitHub output parameters in your CodeCatalyst workflows.

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
  1. Open a workflow and choose Edit. For more information, see Creating a workflow.

  2. In the GitHub Actions action that generates the output parameter that you want to export, add an Outputs section with an underlying Variables 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 the id: property in the GitHub action's steps 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