Skip to content

Commit eee4c63

Browse files
authored
Fail if main or pre jobs are cancelled (#2493)
1 parent 0211f75 commit eee4c63

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

.github/workflows/bench.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,5 @@ jobs:
203203
echo "jobs info: ${{ toJSON(needs) }}"
204204
- if: contains(needs.*.result, 'failure')
205205
run: exit 1
206-
- if: contains(needs.*.result, 'cancelled')
207-
name: cancelling
208-
uses: andymckay/[email protected]
206+
- if: contains(needs.*.result, 'cancelled') && needs.pre_job.outputs.should_skip != 'true'
207+
run: exit 1

.github/workflows/nix.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,5 @@ jobs:
114114
echo "jobs info: ${{ toJSON(needs) }}"
115115
- if: contains(needs.*.result, 'failure')
116116
run: exit 1
117-
- if: contains(needs.*.result, 'cancelled')
118-
name: cancelling
119-
uses: andymckay/[email protected]
117+
- if: contains(needs.*.result, 'cancelled') && needs.pre_job.outputs.should_skip != 'true'
118+
run: exit 1

.github/workflows/test.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,5 @@ jobs:
261261
echo "jobs info: ${{ toJSON(needs) }}"
262262
- if: contains(needs.*.result, 'failure')
263263
run: exit 1
264-
- if: contains(needs.*.result, 'cancelled')
265-
name: cancelling
266-
uses: andymckay/[email protected]
264+
- if: contains(needs.*.result, 'cancelled') && needs.pre_job.outputs.should_skip != 'true'
265+
run: exit 1

0 commit comments

Comments
 (0)