Build End-to-End Test Artifacts #8
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" | |
# concurrency: | |
# group: ${{ github.workflow }}-${{ github.ref_name }} | |
# cancel-in-progress: true | |
on: | |
workflow_dispatch: | |
inputs: | |
operator-branch: | |
required: true | |
type: string | |
default: 'main' | |
agent-branch: | |
required: true | |
type: string | |
default: 'main' | |
workflow_call: | |
inputs: | |
operator-branch: | |
required: true | |
type: string | |
default: 'main' | |
agent-branch: | |
required: true | |
type: string | |
default: ${{github.ref_name}} | |
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-release.yml@main | |
concurrency: | |
group: ${{ github.workflow }}-operator-${{ inputs.operator-branch}} | |
cancel-in-progress: true | |
secrets: inherit | |
with: | |
tag: ${{needs.GetLatestCommitSHAs.outputs.operator_commit_sha}} | |