From 6602eb4b4549a6b0bd2f05e3567af9c2237c48f3 Mon Sep 17 00:00:00 2001 From: Alex Eagle Date: Wed, 20 Nov 2024 07:37:14 -0800 Subject: [PATCH] =?UTF-8?q?chore:=20downstream=20https://github.com/bazel-?= =?UTF-8?q?contrib/rules-template/pul=E2=80=A6=20(#445)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit …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 --- .github/workflows/ci.yaml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 92f9d64..cbeceaa 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -55,3 +55,24 @@ jobs: # - uses: actions/checkout@v4 # - working-directory: e2e/use_release # run: ./minimal_download_test.sh + + # 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