Skip to content

Test Release Candidate #249

Test Release Candidate

Test Release Candidate #249

# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: MIT
name: Test Release Candidate
env:
CWA_GITHUB_TEST_REPO_BRANCH: "main"
on:
workflow_dispatch:
inputs:
build_id:
description: 'The build ID (release candidate build number or GitHub commit SHA)'
type: string
required: true
test_repo_branch:
description: 'Override for the test repo branch (default is main)'
type: string
jobs:
OutputEnvVariables:
name: 'OutputEnvVariables'
runs-on: ubuntu-latest
outputs:
CWA_GITHUB_TEST_REPO_BRANCH: ${{ steps.set-outputs.outputs.CWA_GITHUB_TEST_REPO_BRANCH }}
steps:
- name: SetOutputs
id: set-outputs
env:
TEST_REPO_BRANCH: ${{ inputs.test_repo_branch }}
run: |
CWA_GITHUB_TEST_REPO_BRANCH="$TEST_REPO_BRANCH"
echo "CWA_GITHUB_TEST_REPO_BRANCH=${CWA_GITHUB_TEST_REPO_BRANCH:-${{ env.CWA_GITHUB_TEST_REPO_BRANCH }}}" >> "$GITHUB_OUTPUT"
- name: Echo test variables
run: |
echo "CWA_GITHUB_TEST_REPO_BRANCH: ${{ steps.set-outputs.outputs.CWA_GITHUB_TEST_REPO_BRANCH }}"
RepackageArtifacts:
name: 'RepackageArtifacts'
uses: ./.github/workflows/repackage-release-artifacts.yml
secrets: inherit
permissions:
id-token: write
contents: read
with:
build_id: ${{ inputs.build_id }}
StartIntegrationTests:
needs: [ RepackageArtifacts, OutputEnvVariables ]
permissions:
actions: write
runs-on: ubuntu-latest
steps:
# Avoid the limit of 5 nested workflows by executing the workflow in this manner
- run: gh workflow run test-artifacts.yml --ref ${{ github.ref_name }} --repo $GITHUB_REPOSITORY -f build_id=${{ inputs.build_id }} -f test_repo_branch=${{ needs.OutputEnvVariables.outputs.CWA_GITHUB_TEST_REPO_BRANCH }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}