Skip to content

Commit 849fe0e

Browse files
committed
Use checked out SHA hash when uploading code scanning result
1 parent df92ca1 commit 849fe0e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Diff for: .github/workflows/static-analysis.yml

+6
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ jobs:
3434
with:
3535
ref: ${{ github.event_name == 'workflow_dispatch' && inputs.ref || github.ref }}
3636

37+
- name: "Get SHA hash of checked out ref"
38+
if: ${{ github.event_name == 'workflow_dispatch' }}
39+
run: |
40+
echo CHECKED_OUT_SHA=$(git rev-parse HEAD) >> $GITHUB_ENV
41+
3742
- name: "Setup"
3843
uses: "./.github/actions/setup"
3944
with:
@@ -48,3 +53,4 @@ jobs:
4853
with:
4954
sarif_file: psalm.sarif
5055
ref: ${{ github.event_name == 'workflow_dispatch' && inputs.ref || github.ref }}
56+
sha: ${{ github.event_name == 'workflow_dispatch' && env.CHECKED_OUT_SHA || github.sha }}

0 commit comments

Comments
 (0)