-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (32 loc) · 1022 Bytes
/
maven.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
name: Java CI with Maven
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
permissions:
contents: read
packages: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
jobs:
build:
runs-on: ubuntu-latest
env:
QUARKUS_APPLICATION_VERSION: ${{ github.run_number }}
QUARKUS_CONTAINER_IMAGE_PUSH: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
QUARKUS_CONTAINER_IMAGE_USERNAME: ${{ github.actor }}
QUARKUS_CONTAINER_IMAGE_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Build and conditionally push container image with Maven
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ./mvnw -B package -Dquarkus.container-image.build=true