generated from SAP/repository-template
-
Notifications
You must be signed in to change notification settings - Fork 10
31 lines (28 loc) · 814 Bytes
/
ci-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
name: Java CI with Maven
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
java-version: [ 8, 11, 17 ]
name: Build with Java ${{ matrix.java-version }}
steps:
- uses: actions/checkout@v3
- name: Set up JDK ${{ matrix.java-version }}
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: ${{ matrix.java-version }}
- name: Build with Maven
run: mvn clean install -Dgpg.skip --no-transfer-progress
- name: Check for source code changes
run: |
if [[ `git status --porcelain` ]]; then
echo -e "Following files need to be formatted: \n$(git diff --name-only)"
exit 1
fi