Build End-to-End Test Artifacts #12
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build End-to-End Test Artifacts | |
env: | |
OPERATOR_GITHUB_REPO_NAME: "aws/amazon-cloudwatch-agent-operator" | |
ECR_TARGET_ALLOCATOR_STAGING_REPO: ${{ vars.ECR_TARGET_ALLOCATOR_STAGING_REPO}} | |
ECR_OPERATOR_RELEASE_IMAGE: ${{ vars.ECR_TARGET_ALLOCATOR_TEST_OPERATOR_REPO}} | |
on: | |
workflow_dispatch: | |
inputs: | |
operator-branch: | |
required: true | |
type: string | |
default: 'main' | |
workflow_call: | |
inputs: | |
operator-branch: | |
required: true | |
type: string | |
default: 'main' | |
jobs: | |
GetLatestCommitSHAs: | |
runs-on: ubuntu-latest | |
outputs: | |
operator_commit_sha: ${{steps.get_latest_sha.outputs.operator_sha}} | |
steps: | |
- name: Checkout the target repo | |
uses: actions/checkout@v3 | |
with: | |
repository: ${{env.OPERATOR_GITHUB_REPO_NAME}} | |
ref: ${{inputs.operator-branch}} | |
path: operator-repo | |
- name: Get latest commit SHA | |
id: get_latest_sha | |
run: | | |
cd operator-repo | |
latest_sha=$(git rev-parse HEAD) | |
echo "::set-output name=operator_sha::$latest_sha" | |
BuildAgent: | |
uses: ./.github/workflows/build-test-artifacts.yml | |
concurrency: | |
group: "Build-Test-Artifacts-${{ inputs.agent-branch}}" | |
cancel-in-progress: true | |
secrets: inherit | |
permissions: | |
id-token: write | |
contents: read | |
BuildOperator: | |
needs: [GetLatestCommitSHAs] | |
uses: aws/amazon-cloudwatch-agent-operator/.github/workflows/build-and-upload.yml@e2e-testing | |
concurrency: | |
group: ${{ github.workflow }}-operator-${{ inputs.operator-branch}} | |
cancel-in-progress: true | |
secrets: inherit | |
with: | |
tag: ${{needs.GetLatestCommitSHAs.outputs.operator_commit_sha}} | |
target-branch: ${{needs.GetLatestCommitSHAs.outputs.operator_commit_sha}} | |