-
Notifications
You must be signed in to change notification settings - Fork 1
46 lines (41 loc) · 1.14 KB
/
build-pr.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
46
name: Build Pull Request
on:
pull_request:
branches:
- develop
- release/*
- support/*
paths-ignore:
- "**/README.md"
- "CONTRIBUTING.md"
- ".github/**"
- "!.github/workflows/build-pr.yml"
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: 17
cache: "maven"
- uses: Keeper-Security/ksm-action@v1
env:
KSM_CONFIG: ${{ secrets.KSM_CONFIG }}
if: ${{ env.KSM_CONFIG != '' }}
with:
keeper-secret-config: ${{ secrets.KSM_CONFIG }}
secrets: |
${{ vars.KEEPER_SONARCLOUD_RECORD_ID }}/field/password > env:SONAR_TOKEN
- name: Build with Sonarcloud
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: ${{ env.SONAR_TOKEN != '' }}
run: ./mvnw -B -ntp verify sonar:sonar
- name: Build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: ${{ env.SONAR_TOKEN == '' }}
run: ./mvnw -B -ntp verify