Skip to content

Commit d10978d

Browse files
committed
feat: maven build pr workflow
1 parent f6b64cb commit d10978d

File tree

2 files changed

+30
-1
lines changed

2 files changed

+30
-1
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Maven and Docker Build
2+
3+
on:
4+
workflow_call:
5+
6+
jobs:
7+
build:
8+
name: Maven and Docker Build
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v3
13+
14+
- name: Set up Java
15+
uses: actions/setup-java@v3
16+
with:
17+
java-version: "17"
18+
distribution: "liberica"
19+
cache: "maven"
20+
21+
- name: Verify with Maven
22+
run: mvn verify -B -P prod "-Dstyle.color=always"
23+
24+
- name: Build and push
25+
uses: docker/build-push-action@v5
26+
with:
27+
context: .
28+
push: false

.github/workflows/maven-bump-push-dockerhub.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ jobs:
2020
url: https://hub.docker.com/layers/${{ inputs.image_name }}/${{ steps.bump.outputs.tag }}/images/${{ steps.docker_build_push.outputs.digest }}
2121

2222
steps:
23-
- uses: actions/checkout@v3
23+
- name: Checkout
24+
uses: actions/checkout@v3
2425
with:
2526
token: ${{ secrets.BUMP_PAT }}
2627

0 commit comments

Comments
 (0)