-
Notifications
You must be signed in to change notification settings - Fork 8
47 lines (44 loc) · 1.19 KB
/
pr-ci.yaml
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: PR CI build
concurrency:
group: ci-${{ github.run_id }}
cancel-in-progress: true
on:
pull_request_target:
types:
- opened
- reopened
- synchronize
- labeled
- unlabeled
branches:
- main
- v[0-9]+
- v[0-9]+.[0-9]+
- cryostat-v[0-9]+.[0-9]+
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
JVM_version: ['11', '17', '21']
if: ${{ github.repository_owner == 'cryostatio' }}
steps:
- name: Fail if PR and safe-to-test label NOT applied
if: ${{ github.event_name == 'pull_request_target' && !contains(github.event.pull_request.labels.*.name, 'safe-to-test') }}
run: exit 1
- uses: actions/checkout@v3
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
submodules: true
- uses: actions/setup-java@v2
with:
java-version: ${{ matrix.JVM_version }}
distribution: 'temurin'
- uses: skjolber/maven-cache-github-action@v1
with:
step: restore
- run: mvn -B -U clean verify
- uses: skjolber/maven-cache-github-action@v1
with:
step: save