@@ -103,9 +103,7 @@ jobs:
103103 if : ${{ failure() && github.event_name == 'merge_group' }}
104104 env :
105105 GH_TOKEN : ${{ github.token }}
106- run : |
107- echo "::error::Cancelling merge queue workflow because maven-checks ${{ matrix.java-version }} failed"
108- gh run cancel "${GITHUB_RUN_ID}" --repo "${GITHUB_REPOSITORY}"
106+ run : .github/bin/cancel-merge-queue-workflow.sh "maven-checks ${{ matrix.java-version }}"
109107
110108 artifact-checks :
111109 needs : path-filters
@@ -145,9 +143,7 @@ jobs:
145143 if : ${{ failure() && github.event_name == 'merge_group' }}
146144 env :
147145 GH_TOKEN : ${{ github.token }}
148- run : |
149- echo "::error::Cancelling merge queue workflow because artifact-checks failed"
150- gh run cancel "${GITHUB_RUN_ID}" --repo "${GITHUB_REPOSITORY}"
146+ run : .github/bin/cancel-merge-queue-workflow.sh "artifact-checks"
151147
152148 check-commits-dispatcher :
153149 needs : path-filters
@@ -237,9 +233,7 @@ jobs:
237233 if : ${{ failure() && github.event_name == 'merge_group' }}
238234 env :
239235 GH_TOKEN : ${{ github.token }}
240- run : |
241- echo "::error::Cancelling merge queue workflow because error-prone-checks failed"
242- gh run cancel "${GITHUB_RUN_ID}" --repo "${GITHUB_REPOSITORY}"
236+ run : .github/bin/cancel-merge-queue-workflow.sh "error-prone-checks"
243237
244238 test-jdbc-compatibility :
245239 needs : path-filters
@@ -286,9 +280,7 @@ jobs:
286280 if : ${{ failure() && github.event_name == 'merge_group' }}
287281 env :
288282 GH_TOKEN : ${{ github.token }}
289- run : |
290- echo "::error::Cancelling merge queue workflow because test-jdbc-compatibility failed"
291- gh run cancel "${GITHUB_RUN_ID}" --repo "${GITHUB_REPOSITORY}"
283+ run : .github/bin/cancel-merge-queue-workflow.sh "test-jdbc-compatibility"
292284
293285 hive-tests :
294286 needs : path-filters
@@ -351,9 +343,7 @@ jobs:
351343 if : ${{ failure() && github.event_name == 'merge_group' }}
352344 env :
353345 GH_TOKEN : ${{ github.token }}
354- run : |
355- echo "::error::Cancelling merge queue workflow because hive-tests (${{ matrix.config }}) failed"
356- gh run cancel "${GITHUB_RUN_ID}" --repo "${GITHUB_REPOSITORY}"
346+ run : .github/bin/cancel-merge-queue-workflow.sh "hive-tests (${{ matrix.config }})"
357347
358348 test-other-modules :
359349 needs : path-filters
@@ -446,9 +436,7 @@ jobs:
446436 if : ${{ failure() && github.event_name == 'merge_group' }}
447437 env :
448438 GH_TOKEN : ${{ github.token }}
449- run : |
450- echo "::error::Cancelling merge queue workflow because test-other-modules failed"
451- gh run cancel "${GITHUB_RUN_ID}" --repo "${GITHUB_REPOSITORY}"
439+ run : .github/bin/cancel-merge-queue-workflow.sh "test-other-modules"
452440
453441 build-test-matrix :
454442 needs : path-filters
@@ -569,9 +557,7 @@ jobs:
569557 if : ${{ failure() && github.event_name == 'merge_group' }}
570558 env :
571559 GH_TOKEN : ${{ github.token }}
572- run : |
573- echo "::error::Cancelling merge queue workflow because build-test-matrix failed"
574- gh run cancel "${GITHUB_RUN_ID}" --repo "${GITHUB_REPOSITORY}"
560+ run : .github/bin/cancel-merge-queue-workflow.sh "build-test-matrix"
575561
576562 test :
577563 runs-on : ' ubuntu-latest'
@@ -876,9 +862,7 @@ jobs:
876862 if : ${{ failure() && github.event_name == 'merge_group' }}
877863 env :
878864 GH_TOKEN : ${{ github.token }}
879- run : |
880- echo "::error::Cancelling merge queue workflow because test (${{ matrix.modules }}, ${{ matrix.profile }}, ${{ matrix.jdk }}) failed"
881- gh run cancel "${GITHUB_RUN_ID}" --repo "${GITHUB_REPOSITORY}"
865+ run : .github/bin/cancel-merge-queue-workflow.sh "test (${{ matrix.modules }}, ${{ matrix.profile }}, ${{ matrix.jdk }})"
882866
883867 build-pt :
884868 needs : path-filters
@@ -1079,9 +1063,7 @@ jobs:
10791063 if : ${{ failure() && github.event_name == 'merge_group' }}
10801064 env :
10811065 GH_TOKEN : ${{ github.token }}
1082- run : |
1083- echo "::error::Cancelling merge queue workflow because build-pt failed"
1084- gh run cancel "${GITHUB_RUN_ID}" --repo "${GITHUB_REPOSITORY}"
1066+ run : .github/bin/cancel-merge-queue-workflow.sh "build-pt"
10851067
10861068 pt :
10871069 runs-on : ' ubuntu-latest'
@@ -1176,9 +1158,7 @@ jobs:
11761158 if : ${{ failure() && github.event_name == 'merge_group' }}
11771159 env :
11781160 GH_TOKEN : ${{ github.token }}
1179- run : |
1180- echo "::error::Cancelling merge queue workflow because pt (${{ matrix.config }}, ${{ matrix.suite }}, ${{ matrix.jdk }}) failed"
1181- gh run cancel "${GITHUB_RUN_ID}" --repo "${GITHUB_REPOSITORY}"
1161+ run : .github/bin/cancel-merge-queue-workflow.sh "pt (${{ matrix.config }}, ${{ matrix.suite }}, ${{ matrix.jdk }})"
11821162
11831163 build-success :
11841164 if : ${{ always() }} # if `failure()` would not work for cancellations, `!success()` would not work for skipped jobs
0 commit comments