-
Notifications
You must be signed in to change notification settings - Fork 1
24 lines (22 loc) · 951 Bytes
/
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
name: Build
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Get version in pom.xml
id: get_version
run: echo ::set-output name=VERSION::$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec)
- name: Get version in pom-cluecumber.xml
id: get_version_cluecumber
run: echo ::set-output name=VERSION::$(mvn -q -f pom-cluecumber.xml -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec)
- name: Compare versions
run: if [ "${{ steps.get_version.outputs.VERSION }}" = "${{ steps.get_version_cluecumber.outputs.VERSION }}" ]; then exit 0; else exit 1; fi
- name: Build with Maven
run: ./mvnw -B clean spring-boot:build-image --file pom.xml