Fail PR check if workflow failed
MODIFY
.github/workflows/pr.yaml
.github/workflows/pr.yaml
@@ -145,6 +145,11 @@ jobs:
accept-pr:
needs: [ build, test, smoke-test, muzzle ]
runs-on: ubuntu-latest
+ if: always()
steps:
- - name: Success
- run: echo Build successful
\ No newline at end of file
+ # run this action to get workflow conclusion
+ # You can get conclusion by env (env.WORKFLOW_CONCLUSION)
+ - uses: technote-space/workflow-conclusion-action@v1
+ - name: Fail build
+ if: env.WORKFLOW_CONCLUSION == 'failure' # notify only if failure
+ run: exit 1
\ No newline at end of file

Fail PR check if workflow failed (#1498)