Skip to content

Commit

Permalink
Actually detect success of workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Nemo157 committed May 23, 2023
1 parent 9147711 commit fc6a9ca
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,14 @@ jobs:
success:
runs-on: ubuntu-latest
needs: [pull_request]
if: ${{ always() }}
steps:
- run: true
- if: ${{ contains(needs.*.result, 'failure') }}
run: exit 1
- if: ${{ contains(needs.*.result, 'cancelled') }}
run: exit 1
- if: ${{ contains(needs.*.result, 'skipped') }}
run: exit 1

on:
pull_request:
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,14 @@ jobs:
success:
runs-on: ubuntu-latest
needs: [pull_request, staging]
if: ${{ always() }}
steps:
- run: true
- if: ${{ contains(needs.*.result, 'failure') }}
run: exit 1
- if: ${{ contains(needs.*.result, 'cancelled') }}
run: exit 1
- if: ${{ contains(needs.*.result, 'skipped') }}
run: exit 1

on:
merge_group:
Expand Down

0 comments on commit fc6a9ca

Please sign in to comment.