-
Notifications
You must be signed in to change notification settings - Fork 62
51 lines (43 loc) · 1.4 KB
/
update-load-generator-image.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
# This workflow uses GHA to build a Java project with Gradle 'load-generator', and build and push multi-arch docker image of this project to the Amazon ECR.
name: Update Load-Generator Image
# Should execute only one workflow run at a time
concurrency:
group: build-and-push-load-generator-image
cancel-in-progress: false
on:
workflow_dispatch:
push:
branches: ['terraform']
# List of paths that should be considered when triggering the workflow
paths: ['load-generator/**']
permissions:
id-token: write
contents: read
jobs:
create-and-push-load-generator-image-on-push:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.TEST_FW_ASSUMABLE_ROLE_ARN }}
aws-region: us-east-1
role-duration-seconds: 7200
- name: Login to Amazon ECR Public
id: login-ecr-public
uses: aws-actions/amazon-ecr-login@v2
with:
registry-type: public
- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 17
- name: Build image with jib
uses: gradle/gradle-build-action@v2
with:
arguments: :load-generator:jib
env:
COMMIT_HASH: ${{ github.sha }}