File tree Expand file tree Collapse file tree 1 file changed +25
-5
lines changed Expand file tree Collapse file tree 1 file changed +25
-5
lines changed Original file line number Diff line number Diff line change 4545 - github-actions-test
4646 - tsc-compliance-test
4747 runs-on : ubuntu-latest
48- # This is a bit of a hack - Branch protections depend upon selected
49- # workflows that run on hardware, not parents of many callable workflows.
50- # Adding this so that unit and bundle checks can be a single protection line.
48+ if : success() # only run when all checks have passed
49+ # store success output flag for ci job
50+ outputs :
51+ success : ${{ steps.setoutput.outputs.success }}
5152 steps :
52- - name : All tests passed
53- run : echo "All tests passed"
53+ - id : setoutput
54+ run : echo "::set-output name=success::true"
55+ ci :
56+ runs-on : ubuntu-latest
57+ if : always() # always run, so we never skip the check
58+ name : ci - Unit and Bundle tests have passed
59+ needs : all-unit-tests-pass
60+ env :
61+ PASSED : ${{ needs.all-unit-tests-pass.outputs.success }}
62+ steps :
63+ # this job passes only when output of all-unit-tests-pass job is set
64+ # in case at least one of the checks fails, all-unit-tests-pass is skipped
65+ # and the output will not be set, which will then cause the ci job to fail
66+ - run : |
67+ if [[ $PASSED == "true" ]]; then
68+ echo "All checks have passed"
69+ exit 0
70+ else
71+ echo "One or more checks have failed"
72+ exit 1
73+ fi
You can’t perform that action at this time.
0 commit comments