Skip to content

Commit

Permalink
add 'passed' job for required checks
Browse files Browse the repository at this point in the history
  • Loading branch information
czeslavo committed Mar 16, 2023
1 parent 7ba9471 commit 074464c
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/pr_checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,25 @@ jobs:
kic-image: ${{ needs.build-docker-image.outputs.image }}
load-local-image: true

# We need this step to fail the workflow if any of the previous steps failed or were cancelled.
# It allows to use this particular job as a required check for PRs.
# Ref: https://github.com/orgs/community/discussions/26822#discussioncomment-3305794
passed:
runs-on: ubuntu-latest
needs:
- linters
- unit-tests
- integration-tests
- conformance-tests
- build-docker-image
- e2e-tests
if: always()
steps:
- if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}
run: |
echo "Some jobs failed or were cancelled."
exit 1
test-reports:
needs:
- should-run-with-secrets
Expand Down

0 comments on commit 074464c

Please sign in to comment.