Skip to content

Commit fc6a9ca

Browse files
committed
Actually detect success of workflow
1 parent 9147711 commit fc6a9ca

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

.github/workflows/pull_request.yml

+7-1
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,14 @@ jobs:
44
success:
55
runs-on: ubuntu-latest
66
needs: [pull_request]
7+
if: ${{ always() }}
78
steps:
8-
- run: true
9+
- if: ${{ contains(needs.*.result, 'failure') }}
10+
run: exit 1
11+
- if: ${{ contains(needs.*.result, 'cancelled') }}
12+
run: exit 1
13+
- if: ${{ contains(needs.*.result, 'skipped') }}
14+
run: exit 1
915

1016
on:
1117
pull_request:

.github/workflows/staging.yml

+7-1
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,14 @@ jobs:
66
success:
77
runs-on: ubuntu-latest
88
needs: [pull_request, staging]
9+
if: ${{ always() }}
910
steps:
10-
- run: true
11+
- if: ${{ contains(needs.*.result, 'failure') }}
12+
run: exit 1
13+
- if: ${{ contains(needs.*.result, 'cancelled') }}
14+
run: exit 1
15+
- if: ${{ contains(needs.*.result, 'skipped') }}
16+
run: exit 1
1117

1218
on:
1319
merge_group:

0 commit comments

Comments
 (0)