-
Notifications
You must be signed in to change notification settings - Fork 5
47 lines (43 loc) · 1.46 KB
/
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
42
43
44
45
46
47
name: Build project
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
packages: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup java
uses: actions/setup-java@v4
with:
java-version: 17
distribution: adopt
- name: Build
run: mvn -B package
- name: Docker Login
if: ${{ github.event_name != 'pull_request'}}
run: echo ${{secrets.GITHUB_TOKEN}} | docker login ghcr.io -u ${{github.actor}} --password-stdin
- name: Push image
if: ${{ github.event_name != 'pull_request'}}
run: mvn package -Dquarkus.container-image.push
build-native:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup java
uses: actions/setup-java@v4
with:
java-version: 17
distribution: adopt
- name: Build Native
run: mvn -B package -Pnative -Dquarkus.container-image.build -Dquarkus.container-image.tag=main-native
- name: Docker Login
if: ${{ github.event_name != 'pull_request'}}
run: echo ${{secrets.GITHUB_TOKEN}} | docker login ghcr.io -u ${{github.actor}} --password-stdin
- name: Push Native Image
if: ${{ github.event_name != 'pull_request'}}
run: mvn -B package -Pnative -Dquarkus.container-image.push -Dquarkus.native.reuse-existing=true -Dquarkus.container-image.tag=main-native