Skip to content

Commit 2cbabf6

Browse files
authored
Merge pull request #33 from javaBin/build-with-maven
try by using maven build externally
2 parents 06fdde9 + 2c14cba commit 2cbabf6

2 files changed

Lines changed: 16 additions & 9 deletions

File tree

.github/workflows/cdk-deploy.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,23 @@ jobs:
3434
cache: 'npm'
3535
cache-dependency-path: 'cdk/package-lock.json'
3636

37+
- name: Set up JDK
38+
uses: actions/setup-java@v4
39+
with:
40+
java-version: '25'
41+
distribution: corretto
42+
cache: maven
43+
3744
- name: Install CDK dependencies
3845
working-directory: ./cdk
3946
run: npm ci
4047

4148
- name: Install AWS CDK CLI
4249
run: npm install -g aws-cdk
4350

51+
- name: Build with Maven
52+
run: mvn -B --no-transfer-progress clean package
53+
4454
- name: CDK Deploy
4555
working-directory: ./cdk
4656
run: cdk deploy --require-approval never

.github/workflows/maven.yaml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,10 @@ jobs:
3939
- name: Build with Maven
4040
run: mvn -B --no-transfer-progress clean package
4141

42-
- name: Upload artifact [uber-jar]
43-
uses: actions/upload-artifact@v4
44-
with:
45-
name: uber-jar
46-
path: target/*-jar-with-dependencies.jar
47-
if-no-files-found: error
48-
retention-days: 7
49-
5042
- name: Build and push docker image [edge]
51-
run: docker buildx build --push -t ghcr.io/javabin/cake-redux:edge --platform linux/amd64,linux/arm64 .
43+
if: github.ref == 'refs/heads/master'
44+
run: docker buildx build --push -t ghcr.io/javabin/cake-redux:edge --platform linux/amd64,linux/arm64 .
45+
46+
- name: Build docker image [edge]
47+
if: github.ref != 'refs/heads/master'
48+
run: docker buildx build -t ghcr.io/javabin/cake-redux:edge --platform linux/amd64,linux/arm64 .

0 commit comments

Comments
 (0)