-
Notifications
You must be signed in to change notification settings - Fork 4
49 lines (45 loc) · 1.32 KB
/
kafka-sample-spring-modulith.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
name: kafka-spring-modulith-outbox-pattern-sample
on:
push:
paths:
- "spring-modulith-outbox-pattern/**"
branches: [ main ]
pull_request:
paths:
- "spring-modulith-outbox-pattern/**"
types:
- opened
- synchronize
- reopened
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: "spring-modulith-outbox-pattern"
strategy:
matrix:
java: ["21"]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: graalvm/setup-graalvm@v1
with:
distribution: 'graalvm'
java-version: ${{ matrix.java }}
cache: "maven"
- name: Printing versions
run: |
echo "GRAALVM_HOME: $GRAALVM_HOME"
echo "JAVA_HOME: $JAVA_HOME"
java --version
native-image --version
- name: Build with Maven
run: ./mvnw -B verify --file pom.xml
- if: ${{ github.ref == 'refs/heads/main' }}
name: Build and Publish Docker Image
run: |
docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }}
./mvnw -Pnative spring-boot:build-image -Dspring-boot.build-image.imageName=${{ secrets.DOCKER_USERNAME }}/spring-modulith-outbox-pattern
docker push ${{ secrets.DOCKER_USERNAME }}/spring-modulith-outbox-pattern