From 17c305bd945a8647078d4c104ad05eea97e1c9ea Mon Sep 17 00:00:00 2001 From: "Felt, Nicholas" Date: Tue, 27 Aug 2024 09:58:38 -0700 Subject: [PATCH] feat: Add a job that checks that all CodeQL analysis passed to enable easier Required Status Checks --- .github/workflows/_reusable-codeql-analysis.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/_reusable-codeql-analysis.yml b/.github/workflows/_reusable-codeql-analysis.yml index a805357a..c6945b29 100644 --- a/.github/workflows/_reusable-codeql-analysis.yml +++ b/.github/workflows/_reusable-codeql-analysis.yml @@ -35,3 +35,13 @@ jobs: uses: github/codeql-action/analyze@v3 with: category: /language:${{matrix.language}} + # Check that all jobs passed + check-codeql-passed: + if: ${{ !cancelled() }} + needs: [analyze] + runs-on: ubuntu-latest + steps: + - name: Decide whether the needed jobs succeeded or failed + uses: re-actors/alls-green@v1.2.2 + with: + jobs: ${{ toJSON(needs) }}