-
Notifications
You must be signed in to change notification settings - Fork 12
42 lines (35 loc) · 987 Bytes
/
merge-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
name: On Merge
on:
push:
branches:
- main
jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 23
uses: actions/setup-java@v4
with:
distribution: oracle
java-version: 23
- name: Cache Maven packages
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Build
run: mvn -q clean compile
- name: Test
run: mvn test
- name: Publish artifact on GitHub Packages
run: mvn -q deploy -DskipTests
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish Docker image
run: |
mvn compile jib:build \
-Djib.to.auth.username=${{ github.actor }} \
-Djib.to.auth.password=${{ secrets.DOCKER_ACCESS_TOKEN }}