Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 30 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,31 @@ concurrency:
cancel-in-progress: true

jobs:
check-labels:
runs-on: ubuntu-latest
outputs:
skip: ${{ steps.check.outputs.skip }}

steps:
- name: Check PR labels
id: check
run: |
labels=$(jq -r '.pull_request.labels | map(.name) | join(",")' $GITHUB_EVENT_PATH)
if [[ "$labels" == *"[no ci]"* ]]; then
echo "skip=true" >> $GITHUB_OUTPUT
else
echo "skip=false" >> $GITHUB_OUTPUT
fi
if [[ "$labels" == *"don't test"* ]]; then
echo "skip_tests=true" >> $GITHUB_OUTPUT
else
echo "skip_tests=false" >> $GITHUB_OUTPUT
fi

build:
needs: check-labels
if: needs.check-labels.outputs.skip == 'false'

strategy:
matrix:
profile: [ 'jdk17', 'jdk17-aarch64' ]
Expand Down Expand Up @@ -49,4 +73,9 @@ jobs:
- name: Build and test with Maven
env:
SKIP_DOCKER_TESTS: "true"
run: ./mvnw -s .github/settings.xml -B clean install -Pgha -Pdocker -Pit -P${{ matrix.profile }}
run: |
if [[ "${{ needs.check-labels.outputs.skip_tests }}" == "true" ]]; then
./mvnw -s .github/settings.xml -B clean install -Pgha -Pdocker -P${{ matrix.profile }} -DskipTests
else
./mvnw -s .github/settings.xml -B clean install -Pgha -Pdocker -Pit -P${{ matrix.profile }}
fi