Skip to content

Commit 6f89939

Browse files
committed
Upload code scanning results to correct ref when releasing
1 parent 42f5a49 commit 6f89939

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

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

+7
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ jobs:
2929
with:
3030
ref: ${{ github.event_name == 'workflow_dispatch' && inputs.ref || github.ref }}
3131

32+
- name: "Get SHA hash of checked out ref"
33+
if: ${{ github.event_name == 'workflow_dispatch' }}
34+
run: |
35+
echo CHECKED_OUT_SHA=$(git rev-parse HEAD) >> $GITHUB_ENV
36+
3237
- name: Setup PHP
3338
uses: shivammathur/setup-php@v2
3439
with:
@@ -64,6 +69,8 @@ jobs:
6469
uses: "github/codeql-action/upload-sarif@v3"
6570
with:
6671
sarif_file: phpstan.sarif
72+
ref: ${{ github.event_name == 'workflow_dispatch' && inputs.ref || github.ref }}
73+
sha: ${{ github.event_name == 'workflow_dispatch' && env.CHECKED_OUT_SHA || github.sha }}
6774

6875
- name: Save cache PHPStan results
6976
id: phpstan-cache-save

0 commit comments

Comments
 (0)