Skip to content
This repository was archived by the owner on Jun 27, 2023. It is now read-only.

Commit ea9a9b9

Browse files
authored
Create checkBuild.yml
1 parent a1c80ba commit ea9a9b9

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

.github/checkBuild.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Check Build
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches: [ develop ]
7+
paths-ignore:
8+
- '**.md'
9+
pull_request:
10+
branches: [ develop ]
11+
paths-ignore:
12+
- '**.md'
13+
14+
jobs:
15+
build:
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- uses: actions/checkout@v2
20+
21+
- name: Set up JDK 8
22+
uses: actions/setup-java@v2
23+
with:
24+
distribution: 'zulu'
25+
java-version: '8'
26+
java-package: jdk+fx
27+
28+
- name: Cache local Maven repository
29+
uses: actions/cache@v2
30+
with:
31+
path: ~/.m2/repository
32+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
33+
restore-keys: |
34+
${{ runner.os }}-maven-
35+
36+
- name: Build with Maven
37+
run: mvn -B clean verify
38+
39+
- name: Check for uncommited changes
40+
run: |
41+
if [[ "$(git status --porcelain)" != "" ]]; then
42+
echo ----------------------------------------
43+
echo git status
44+
echo ----------------------------------------
45+
git status
46+
echo ----------------------------------------
47+
echo git diff
48+
echo ----------------------------------------
49+
git diff
50+
echo ----------------------------------------
51+
echo Troubleshooting
52+
echo ----------------------------------------
53+
echo "::error::Unstaged changes detected. Locally try running: git clean -ffdx && mvn -B clean verify"
54+
exit 1
55+
fi

0 commit comments

Comments
 (0)