From c6d927b6a6a72e1d477691e8756c0522177ce600 Mon Sep 17 00:00:00 2001 From: Marc Nuri Date: Thu, 5 Mar 2026 14:41:42 +0100 Subject: [PATCH] fix(ci): inline cancel-on-failure to fix workflow status shown as skipped The separate cancel-on-failure job introduced in #7475 is skipped when the main job succeeds, causing GitHub to mark the entire workflow as "skipped" in the UI. Moving the cancellation into a step within the main job avoids this since steps with `if: failure()` are silently skipped without affecting the overall workflow status. Co-Authored-By: Claude Opus 4.6 Signed-off-by: Marc Nuri --- .github/workflows/generate-model.yml | 12 +++--------- .github/workflows/style-checks.yml | 12 +++--------- 2 files changed, 6 insertions(+), 18 deletions(-) diff --git a/.github/workflows/generate-model.yml b/.github/workflows/generate-model.yml index 65df37ff0c..31a9e39467 100644 --- a/.github/workflows/generate-model.yml +++ b/.github/workflows/generate-model.yml @@ -66,12 +66,6 @@ jobs: echo "Schema files modified. Build Failure"; exit 1; fi; - - cancel-on-failure: - name: Cancel PR workflows on failure - runs-on: ubuntu-latest - if: ${{ failure() && github.event_name == 'pull_request' }} - needs: [generate-model] - steps: - - uses: actions/checkout@v6 - - uses: ./.github/actions/cancel-pr-workflows + - name: Cancel PR workflows on failure + if: ${{ failure() && github.event_name == 'pull_request' }} + uses: ./.github/actions/cancel-pr-workflows diff --git a/.github/workflows/style-checks.yml b/.github/workflows/style-checks.yml index 8616a1da9a..cc2c17e494 100644 --- a/.github/workflows/style-checks.yml +++ b/.github/workflows/style-checks.yml @@ -52,12 +52,6 @@ jobs: run: ./mvnw ${MAVEN_ARGS} -Pitests -N license:check - name: Check Format (only on touched files) run: ./mvnw ${MAVEN_ARGS} -Pitests spotless:check - - cancel-on-failure: - name: Cancel PR workflows on failure - runs-on: ubuntu-latest - if: ${{ failure() && github.event_name == 'pull_request' }} - needs: [style-check] - steps: - - uses: actions/checkout@v6 - - uses: ./.github/actions/cancel-pr-workflows + - name: Cancel PR workflows on failure + if: ${{ failure() && github.event_name == 'pull_request' }} + uses: ./.github/actions/cancel-pr-workflows