-
Notifications
You must be signed in to change notification settings - Fork 213
63 lines (55 loc) · 2.03 KB
/
e2e-build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
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}}