Skip to content

Commit fbb8eb4

Browse files
authored
chore: adopt conclusion job for stable status check (#700)
Rolls out bazel-contrib/rules-template#124
1 parent 0f52f92 commit fbb8eb4

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
@@ -198,3 +198,24 @@ jobs:
198198
run: |
199199
echo "import $GITHUB_WORKSPACE/.github/workflows/ci.bazelrc" > .bazelrc
200200
bats -r .
201+
202+
# For branch protection settings, this job provides a "stable" name that can be used to gate PR merges
203+
# on "all matrix jobs were successful".
204+
conclusion:
205+
needs: test
206+
runs-on: ubuntu-latest
207+
if: always()
208+
steps:
209+
- uses: technote-space/workflow-conclusion-action@45ce8e0eb155657ab8ccf346ade734257fd196a5 # v3.0.3
210+
211+
# Note: possible conclusion values:
212+
# https://github.com/technote-space/workflow-conclusion-action/blob/main/src/constant.ts
213+
- name: report success
214+
if: ${{ env.WORKFLOW_CONCLUSION == 'success' }}
215+
working-directory: /tmp
216+
run: echo ${{ env.WORKFLOW_CONCLUSION }} && exit 0
217+
218+
- name: report failure
219+
if: ${{ env.WORKFLOW_CONCLUSION == 'failure' }}
220+
working-directory: /tmp
221+
run: echo ${{ env.WORKFLOW_CONCLUSION }} && exit 1

0 commit comments

Comments
 (0)