Skip to content

Commit 8d438e4

Browse files
author
Anuraag Agrawal
authored
Update workflow JDK to 17 and use docker login action (#148)
* Update workflow JDK to 17 and use docker login action * Use official gradle action
1 parent 891a9f6 commit 8d438e4

7 files changed

+52
-34
lines changed

.github/workflows/docker-build-corretto-slim.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,10 @@ jobs:
2424
with:
2525
role-to-assume: ${{ secrets.AWS_ASSUME_ROLE_ARN }}
2626
aws-region: ${{ env.AWS_DEFAULT_REGION }}
27-
- name: Login to ECR
28-
run: aws ecr-public get-login-password | docker login --username AWS --password-stdin public.ecr.aws
27+
- name: Log in to AWS ECR
28+
uses: docker/login-action@v1
29+
with:
30+
registry: public.ecr.aws
2931

3032
- name: Set up QEMU
3133
uses: docker/setup-qemu-action@v1

.github/workflows/docker-build-smoke-tests-fake-backend.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,19 @@ jobs:
2222
- uses: actions/checkout@v2
2323
- uses: actions/setup-java@v1
2424
with:
25-
java-version: 14
25+
java-version: 17
2626
- uses: gradle/wrapper-validation-action@v1
2727
- name: Configure AWS Credentials
2828
uses: aws-actions/configure-aws-credentials@v1
2929
with:
3030
role-to-assume: ${{ secrets.AWS_ASSUME_ROLE_ARN }}
3131
aws-region: ${{ env.AWS_DEFAULT_REGION }}
32-
- name: Login to ECR
33-
run: aws ecr-public get-login-password | docker login --username AWS --password-stdin public.ecr.aws
32+
- name: Log in to AWS ECR
33+
uses: docker/login-action@v1
34+
with:
35+
registry: public.ecr.aws
3436

3537
- name: Build and push docker image
36-
uses: burrunan/gradle-cache-action@v1
38+
uses: gradle/gradle-build-action@v2
3739
with:
3840
arguments: :smoke-tests:fakebackend:jib

.github/workflows/main-build.yml

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,20 @@ jobs:
1919
fetch-depth: 0
2020
- uses: actions/setup-java@v1
2121
with:
22-
java-version: 14
22+
java-version: 17
2323
- uses: gradle/wrapper-validation-action@v1
2424
- name: Configure AWS Credentials
2525
uses: aws-actions/configure-aws-credentials@v1
2626
with:
2727
role-to-assume: ${{ secrets.AWS_ASSUME_ROLE_ARN }}
2828
aws-region: ${{ env.AWS_DEFAULT_REGION }}
29-
- name: Login to ECR
30-
run: aws ecr-public get-login-password | docker login --username AWS --password-stdin public.ecr.aws
29+
- name: Log in to AWS ECR
30+
uses: docker/login-action@v1
31+
with:
32+
registry: public.ecr.aws
3133

3234
- name: Build snapshot with Gradle
33-
uses: burrunan/gradle-cache-action@v1
35+
uses: gradle/gradle-build-action@v2
3436
with:
3537
arguments: build snapshot --stacktrace -PenableCoverage=true
3638
env:
@@ -44,7 +46,7 @@ jobs:
4446
name: aws-opentelemetry-agent.jar
4547
path: otelagent/build/libs/aws-opentelemetry-agent-*.jar
4648
- name: Build and push agent and testing docker images with Gradle
47-
uses: burrunan/gradle-cache-action@v1
49+
uses: gradle/gradle-build-action@v2
4850
with:
4951
arguments: jib
5052
env:
@@ -61,14 +63,16 @@ jobs:
6163

6264
- uses: actions/setup-java@v1
6365
with:
64-
java-version: 14
66+
java-version: 17
6567
- name: Configure AWS Credentials
6668
uses: aws-actions/configure-aws-credentials@v1
6769
with:
6870
role-to-assume: ${{ secrets.AWS_ASSUME_ROLE_ARN }}
6971
aws-region: ${{ env.AWS_DEFAULT_REGION }}
70-
- name: Login to ECR
71-
run: aws ecr-public get-login-password | docker login --username AWS --password-stdin public.ecr.aws
72+
- name: Log in to AWS ECR
73+
uses: docker/login-action@v1
74+
with:
75+
registry: public.ecr.aws
7276

7377
- name: Run test containers
7478
run: docker-compose up --abort-on-container-exit
@@ -89,14 +93,16 @@ jobs:
8993

9094
- uses: actions/setup-java@v1
9195
with:
92-
java-version: 14
96+
java-version: 17
9397
- name: Configure AWS Credentials
9498
uses: aws-actions/configure-aws-credentials@v1
9599
with:
96100
role-to-assume: ${{ secrets.AWS_ASSUME_ROLE_ARN }}
97101
aws-region: ${{ env.AWS_DEFAULT_REGION }}
98-
- name: Login to ECR
99-
run: aws ecr-public get-login-password | docker login --username AWS --password-stdin public.ecr.aws
102+
- name: Log in to AWS ECR
103+
uses: docker/login-action@v1
104+
with:
105+
registry: public.ecr.aws
100106

101107
- name: Run test containers
102108
run: docker-compose up --abort-on-container-exit
@@ -117,14 +123,16 @@ jobs:
117123

118124
- uses: actions/setup-java@v1
119125
with:
120-
java-version: 14
126+
java-version: 17
121127
- name: Configure AWS Credentials
122128
uses: aws-actions/configure-aws-credentials@v1
123129
with:
124130
role-to-assume: ${{ secrets.AWS_ASSUME_ROLE_ARN }}
125131
aws-region: ${{ env.AWS_DEFAULT_REGION }}
126-
- name: Login to ECR
127-
run: aws ecr-public get-login-password | docker login --username AWS --password-stdin public.ecr.aws
132+
- name: Log in to AWS ECR
133+
uses: docker/login-action@v1
134+
with:
135+
registry: public.ecr.aws
128136

129137
- name: Run test containers
130138
run: docker-compose up --abort-on-container-exit

.github/workflows/nightly-upstream-snapshot-build.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,20 @@ jobs:
1919
fetch-depth: 0
2020
- uses: actions/setup-java@v1
2121
with:
22-
java-version: 14
22+
java-version: 17
2323
- uses: gradle/wrapper-validation-action@v1
2424
- name: Configure AWS Credentials
2525
uses: aws-actions/configure-aws-credentials@v1
2626
with:
2727
role-to-assume: ${{ secrets.AWS_ASSUME_ROLE_ARN }}
2828
aws-region: ${{ env.AWS_DEFAULT_REGION }}
29-
- name: Login to ECR
30-
run: aws ecr-public get-login-password | docker login --username AWS --password-stdin public.ecr.aws
29+
- name: Log in to AWS ECR
30+
uses: docker/login-action@v1
31+
with:
32+
registry: public.ecr.aws
3133

3234
- name: Build snapshot with Gradle
33-
uses: burrunan/gradle-cache-action@v1
35+
uses: gradle/gradle-build-action@v2
3436
with:
3537
arguments: build --stacktrace -PenableCoverage=true -PtestUpstreamSnapshots=true
3638
env:

.github/workflows/patch-release-build.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,16 @@ jobs:
6262

6363
- uses: actions/setup-java@v1
6464
with:
65-
java-version: 14
65+
java-version: 17
6666
- name: Configure AWS Credentials
6767
uses: aws-actions/configure-aws-credentials@v1
6868
with:
6969
role-to-assume: ${{ secrets.AWS_ASSUME_ROLE_ARN }}
7070
aws-region: ${{ env.AWS_DEFAULT_REGION }}
71-
- name: Login to ECR
72-
run: aws ecr-public get-login-password | docker login --username AWS --password-stdin public.ecr.aws
71+
- name: Log in to AWS ECR
72+
uses: docker/login-action@v1
73+
with:
74+
registry: public.ecr.aws
7375

7476
- name: Setup git name
7577
run: |
@@ -86,7 +88,7 @@ jobs:
8688
done
8789
8890
- name: Build release with Gradle
89-
uses: burrunan/gradle-cache-action@v1
91+
uses: gradle/gradle-build-action@v2
9092
with:
9193
arguments: build jib final closeAndReleaseSonatypeStagingRepository -Prelease.version=${{ github.event.inputs.version }} --stacktrace
9294
env:

.github/workflows/pr-build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ jobs:
1717
- uses: actions/checkout@v2
1818
- uses: actions/setup-java@v1
1919
with:
20-
java-version: 14
20+
java-version: 17
2121
- uses: gradle/wrapper-validation-action@v1
2222
- name: Build with Gradle
23-
uses: burrunan/gradle-cache-action@v1
23+
uses: gradle/gradle-build-action@v2
2424
with:
2525
arguments: build --stacktrace -PenableCoverage=true
2626
- uses: codecov/codecov-action@v1

.github/workflows/release-build.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,20 @@ jobs:
1919
- uses: actions/checkout@v2
2020
- uses: actions/setup-java@v1
2121
with:
22-
java-version: 14
22+
java-version: 17
2323
- uses: gradle/wrapper-validation-action@v1
2424
- name: Configure AWS Credentials
2525
uses: aws-actions/configure-aws-credentials@v1
2626
with:
2727
role-to-assume: ${{ secrets.AWS_ASSUME_ROLE_ARN }}
2828
aws-region: ${{ env.AWS_DEFAULT_REGION }}
29-
- name: Login to ECR1
30-
run: aws ecr-public get-login-password | docker login --username AWS --password-stdin public.ecr.aws
29+
- name: Log in to AWS ECR
30+
uses: docker/login-action@v1
31+
with:
32+
registry: public.ecr.aws
3133

3234
- name: Build release with Gradle
33-
uses: burrunan/gradle-cache-action@v1
35+
uses: gradle/gradle-build-action@v2
3436
with:
3537
arguments: build jib final closeAndReleaseSonatypeStagingRepository -Prelease.version=${{ github.event.inputs.version }} --stacktrace
3638
env:

0 commit comments

Comments
 (0)