Skip to content

Commit 9d29c43

Browse files
author
Ian Lewis
committed
Update CodeQL workflow
Signed-off-by: Ian Lewis <[email protected]>
1 parent 1f9352c commit 9d29c43

File tree

1 file changed

+20
-4
lines changed

1 file changed

+20
-4
lines changed

.github/workflows/codeql-analysis.yml

+20-4
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,21 @@ on:
1818
# If more paths are added here, then they must be added to the paths
1919
# of codeql-analysis-noop.yml.
2020
- "**/*.yml"
21-
- '**/*.md'
21+
- "**/*.md"
2222
pull_request:
2323
# The branches below must be a subset of the branches above
2424
branches: [main]
2525
paths-ignore:
2626
- "**/*.yml"
27-
- '**/*.md'
27+
- "**/*.md"
2828
schedule:
2929
- cron: "21 0 * * 2"
3030

3131
permissions: read-all
3232

3333
jobs:
34-
analyze:
35-
name: Analyze
34+
analyze-matrix:
35+
name: Analyze Matrix
3636
runs-on: ubuntu-latest
3737
permissions:
3838
actions: read
@@ -79,3 +79,19 @@ jobs:
7979

8080
- name: Perform CodeQL Analysis
8181
uses: github/codeql-action/analyze@b398f525a5587552e573b247ac661067fafa920b # tag=v2.1.22
82+
83+
# NOTE: Checks that the matrix job above completes successfully.
84+
# This is necessary because the matrix strategy generates new jobs with
85+
# different names and throws off the required checks on protected
86+
# branches which are set by job name.
87+
analyze:
88+
name: Analyze
89+
runs-on: ubuntu-latest
90+
needs: [analyze-matrix]
91+
if: ${{ always() }}
92+
env:
93+
ANALYZE_RESULT: ${{ needs.analyze-matrix.result }}
94+
steps:
95+
- run: |
96+
# exit 0 if checks were successful.
97+
[ "${ANALYZE_RESULT}" == "success" ]

0 commit comments

Comments
 (0)