-
Notifications
You must be signed in to change notification settings - Fork 13
55 lines (51 loc) · 1.6 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
46
47
48
49
50
51
52
53
54
55
# Build on Push & Pull Request
name: Maven Build
on:
push:
branches:
["release-4.*.*", "release-5.*.*", "release-v2.*.*", "master", "development"]
pull_request:
branches:
["release-4.*.*", "release-5.*.*", "release-v2.*.*", "master", "development"]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: 11
distribution: 'temurin'
- name: Cache Maven packages
uses: actions/cache@v1
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: maven-settings-xml-action
uses: whelk-io/maven-settings-xml-action@v20
with:
servers: >
[
{
"id": "github-message-rosa",
"username": "${env.GITHUB_USERNAME}",
"password": "${env.GITHUB_TOKEN}"
},
{
"id": "github-utils",
"username": "${env.GITHUB_USERNAME}",
"password": "${env.GITHUB_TOKEN}"
}
]
output_file: $GITHUB_WORKSPACE/settings.xml
env:
GITHUB_USERNAME: ${{ secrets.USERNAME }}
GITHUB_TOKEN: ${{ secrets.TOKEN }}
- name: Build and analyze
env:
GITHUB_USERNAME: ${{ secrets.USERNAME }}
GITHUB_TOKEN: ${{ secrets.TOKEN }}
run: mvn -s $GITHUB_WORKSPACE/settings.xml clean install -DskipTests