File tree Expand file tree Collapse file tree 1 file changed +30
-1
lines changed Expand file tree Collapse file tree 1 file changed +30
-1
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,31 @@ concurrency:
1111 cancel-in-progress : true
1212
1313jobs :
14+ check-labels :
15+ runs-on : ubuntu-latest
16+ outputs :
17+ skip : ${{ steps.check.outputs.skip }}
18+
19+ steps :
20+ - name : Check PR labels
21+ id : check
22+ run : |
23+ labels=$(jq -r '.pull_request.labels | map(.name) | join(",")' $GITHUB_EVENT_PATH)
24+ if [[ "$labels" == *"[no ci]"* ]]; then
25+ echo "skip=true" >> $GITHUB_OUTPUT
26+ else
27+ echo "skip=false" >> $GITHUB_OUTPUT
28+ fi
29+ if [[ "$labels" == *"don't test"* ]]; then
30+ echo "skip_tests=true" >> $GITHUB_OUTPUT
31+ else
32+ echo "skip_tests=false" >> $GITHUB_OUTPUT
33+ fi
34+
1435 build :
36+ needs : check-labels
37+ if : needs.check-labels.outputs.skip == 'false'
38+
1539 strategy :
1640 matrix :
1741 profile : [ 'jdk17', 'jdk17-aarch64' ]
4973 - name : Build and test with Maven
5074 env :
5175 SKIP_DOCKER_TESTS : " true"
52- run : ./mvnw -s .github/settings.xml -B clean install -Pgha -Pdocker -Pit -P${{ matrix.profile }}
76+ run : |
77+ if [[ "${{ needs.check-labels.outputs.skip_tests }}" == "true" ]]; then
78+ ./mvnw -s .github/settings.xml -B clean install -Pgha -Pdocker -P${{ matrix.profile }} -DskipTests
79+ else
80+ ./mvnw -s .github/settings.xml -B clean install -Pgha -Pdocker -Pit -P${{ matrix.profile }}
81+ fi
You can’t perform that action at this time.
0 commit comments