Skip to content

Commit

Permalink
[workflows] Add ref and sha to codeql analyze action (#191882)
Browse files Browse the repository at this point in the history
This workflow currently checkouts out two separate branches, but uses
the default branch as a reference when analyzing. We want the results to
split by the branch.

See https://github.com/github/codeql-action/blob/main/analyze/action.yml
for a description of supported options.
  • Loading branch information
jbudz authored Sep 5, 2024
1 parent 6778a00 commit 1bcc3d6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,16 @@ jobs:
run: |
yarn kbn bootstrap --no-validate --no-vscode
- name: Set sha and branch
run: |
echo "CHECKOUT_REF=$(git symbolic-ref HEAD)" >> "$GITHUB_ENV"
echo "CHECKOUT_SHA=$(git rev-parse HEAD)" >> "$GITHUB_ENV"
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@883d8588e56d1753a8a58c1c86e88976f0c23449 # v3.26.3
env:
NODE_OPTIONS: "--max-old-space-size=6144"
with:
category: "/language:${{matrix.language}}"
ref: ${{ env.CHECKOUT_REF }}
sha: ${{ env.CHECKOUT_SHA }}

0 comments on commit 1bcc3d6

Please sign in to comment.