chore: stable job name for branch protection (#883)

adopts https://github.com/bazel-contrib/rules-template/pull/124
This commit is contained in:
Alex Eagle 2024-09-17 17:55:40 -07:00 committed by GitHub
parent 25437fd3e6
commit fa583181ff
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 21 additions and 0 deletions

View File

@ -138,3 +138,24 @@ jobs:
- name: Verify bcr patches - name: Verify bcr patches
if: matrix.folder == '.' && matrix.bzlmod == '1' && matrix.os == 'ubuntu' && matrix.bazel-version.major != '6' if: matrix.folder == '.' && matrix.bzlmod == '1' && matrix.os == 'ubuntu' && matrix.bazel-version.major != '6'
run: patch --dry-run -p1 < .bcr/patches/*.patch run: patch --dry-run -p1 < .bcr/patches/*.patch
# For branch protection settings, this job provides a "stable" name that can be used to gate PR merges
# on "all matrix jobs were successful".
conclusion:
needs: test
runs-on: ubuntu-latest
if: always()
steps:
- uses: technote-space/workflow-conclusion-action@45ce8e0eb155657ab8ccf346ade734257fd196a5 # v3.0.3
# Note: possible conclusion values:
# https://github.com/technote-space/workflow-conclusion-action/blob/main/src/constant.ts
- name: report success
if: ${{ env.WORKFLOW_CONCLUSION == 'success' }}
working-directory: /tmp
run: echo ${{ env.WORKFLOW_CONCLUSION }} && exit 0
- name: report failure
if: ${{ env.WORKFLOW_CONCLUSION == 'failure' }}
working-directory: /tmp
run: echo ${{ env.WORKFLOW_CONCLUSION }} && exit 1