-
Notifications
You must be signed in to change notification settings - Fork 7
45 lines (42 loc) · 1.65 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
name: Maven PR Build
# We require all commits go through PR on GitHub
on:
pull_request:
branches:
- main
jobs:
build:
name: Maven PR Builder (JDK ${{ matrix.java }} with ${{ matrix.build_property }})
runs-on: ubuntu-latest
strategy:
matrix:
java: [ 17, 21 ]
build_property: [ "kakadu.version", "ignored.version" ]
steps:
- name: Check out code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v2
- name: Install JDK ${{ matrix.java }}
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v1
with:
distribution: "temurin"
java-version: ${{ matrix.java }}
cache: maven
- name: Install Kakadu SSH key
uses: webfactory/ssh-agent@dc588b651fe13675774614f8e6a936a468676387 # v0.9.0
env:
KAKADU_PRIVATE_SSH_KEY: ${{ secrets.KAKADU_PRIVATE_SSH_KEY }}
if: ${{ matrix.build_property == 'kakadu.version' && env.KAKADU_PRIVATE_SSH_KEY != null }}
with:
ssh-private-key: ${{ secrets.KAKADU_PRIVATE_SSH_KEY }}
- name: Build with Maven
uses: samuelmeuli/action-maven-publish@201a45a3f311b2ee888f252ba9f4194257545709 # v1.4.0
env:
KAKADU_PRIVATE_SSH_KEY: ${{ secrets.KAKADU_PRIVATE_SSH_KEY }}
if: |
(matrix.build_property == 'kakadu.version' && env.KAKADU_PRIVATE_SSH_KEY != null) ||
matrix.build_property != 'kakadu.version'
with:
maven_goals_phases: "clean verify"
maven_args: >
-V -ntp -DlogLevel=DEBUG -DtestLogLevel=DEBUG
-D${{ matrix.build_property }}=${{ secrets.KAKADU_VERSION }}