Skip to content

Commit c954c10

Browse files
committed
improve ci/cd
1 parent 8b3feea commit c954c10

File tree

3 files changed

+81
-1
lines changed

3 files changed

+81
-1
lines changed

.github/workflows/delivery.yml renamed to .github/workflows/deliver17.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: delivery
33
on:
44
push:
55
branches:
6-
- main
6+
- release/17
77

88
permissions:
99
id-token: write

.github/workflows/deliver18.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: delivery
2+
3+
on:
4+
push:
5+
branches:
6+
- release/18
7+
8+
permissions:
9+
id-token: write
10+
contents: read
11+
12+
jobs:
13+
deploy:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout source code
17+
uses: actions/checkout@v3
18+
- name: Set up JDK 18
19+
uses: actions/setup-java@v3
20+
with:
21+
java-version: '18'
22+
distribution: 'corretto'
23+
- name: Cache local Maven repository
24+
uses: actions/cache@v3
25+
with:
26+
path: ~/.m2/repository
27+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
28+
restore-keys: |
29+
${{ runner.os }}-maven-
30+
- name: Configure AWS credentials
31+
uses: aws-actions/configure-aws-credentials@v1
32+
with:
33+
role-to-assume: arn:aws:iam::${{ secrets.CD_AWS_ACCOUNT_ID }}:role/GitHubRole
34+
aws-region: us-east-1
35+
- name: Login to Amazon ECR Public
36+
uses: aws-actions/amazon-ecr-login@v1
37+
with:
38+
registry-type: "public"
39+
- name: Deploy artifacts
40+
run: mvn -B clean dependency:copy-dependencies docker:build docker:tag docker:push

.github/workflows/integration.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: delivery
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
id-token: write
10+
contents: read
11+
12+
jobs:
13+
deploy:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout source code
17+
uses: actions/checkout@v3
18+
- name: Set up JDK 17
19+
uses: actions/setup-java@v3
20+
with:
21+
java-version: '17'
22+
distribution: 'corretto'
23+
- name: Cache local Maven repository
24+
uses: actions/cache@v3
25+
with:
26+
path: ~/.m2/repository
27+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
28+
restore-keys: |
29+
${{ runner.os }}-maven-
30+
- name: Configure AWS credentials
31+
uses: aws-actions/configure-aws-credentials@v1
32+
with:
33+
role-to-assume: arn:aws:iam::${{ secrets.CD_AWS_ACCOUNT_ID }}:role/GitHubRole
34+
aws-region: us-east-1
35+
- name: Login to Amazon ECR Public
36+
uses: aws-actions/amazon-ecr-login@v1
37+
with:
38+
registry-type: "public"
39+
- name: Deploy artifacts
40+
run: mvn -B clean dependency:copy-dependencies docker:build

0 commit comments

Comments
 (0)