Skip to content

Commit 6602eb4

Browse files
authored
…l/124 Allows branch protection on outcome of the entire matrix --- ### Changes are visible to end-users: no ### Test plan - Covered by existing test cases
1 parent 7c4f601 commit 6602eb4

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,24 @@ jobs:
5555
# - uses: actions/checkout@v4
5656
# - working-directory: e2e/use_release
5757
# run: ./minimal_download_test.sh
58+
59+
# For branch protection settings, this job provides a "stable" name that can be used to gate PR merges
60+
# on "all matrix jobs were successful".
61+
conclusion:
62+
needs: test
63+
runs-on: ubuntu-latest
64+
if: always()
65+
steps:
66+
- uses: technote-space/workflow-conclusion-action@45ce8e0eb155657ab8ccf346ade734257fd196a5 # v3.0.3
67+
68+
# Note: possible conclusion values:
69+
# https://github.com/technote-space/workflow-conclusion-action/blob/main/src/constant.ts
70+
- name: report success
71+
if: ${{ env.WORKFLOW_CONCLUSION == 'success' }}
72+
working-directory: /tmp
73+
run: echo ${{ env.WORKFLOW_CONCLUSION }} && exit 0
74+
75+
- name: report failure
76+
if: ${{ env.WORKFLOW_CONCLUSION == 'failure' }}
77+
working-directory: /tmp
78+
run: echo ${{ env.WORKFLOW_CONCLUSION }} && exit 1

0 commit comments

Comments
 (0)