-
Notifications
You must be signed in to change notification settings - Fork 13
45 lines (38 loc) · 1.15 KB
/
main.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
name: Build and deploy
on:
push:
branches: [ main ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v2
with:
path: main
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Cache local Maven repository
uses: actions/cache@v2
with:
path: |
~/.m2/repository
!~/.m2/repository/org/apache/camel/kameleon
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-maven-
- name: Build application
run: mvn compile test -f main
- name: Build application
run: |
mvn package -f main -DskipTest \
-Dquarkus.container-image.build=true \
-Dquarkus.container-image.push=true \
-Dquarkus.container-image.image=ghcr.io/${GITHUB_REPOSITORY}:latest \
-Dquarkus.container-image.username=${{ github.actor }} \
-Dquarkus.container-image.password=${{ secrets.GITHUB_TOKEN }}