-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (33 loc) · 1.14 KB
/
native-build.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
name: Native image build
on:
push:
branches: [ main ]
env:
REGISTRY: ghcr.io
jobs:
build:
name: Build and Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: graalvm/setup-graalvm@v1
with:
version: "22.3.2"
java-version: "17"
components: "native-image"
github-token: ${{ secrets.GITHUB_TOKEN }}
native-image-job-reports: "true"
- name: Build with Maven
# run: mvn -Pnative spring-boot:build-image -Ddocker.repo=${{ env.REGISTRY }}/${{ github.actor }}
run: mvn -Pnative spring-boot:build-image
- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Rename image
run: docker tag docker.io/library/native-demo:0.0.1-SNAPSHOT ${{ env.REGISTRY }}/${{ github.actor }}/native-demo:latest
- name: Publish Docker image Config
run: docker push ${{ env.REGISTRY }}/${{ github.actor }}/native-demo:latest