Skip to content

Commit e79b0ae

Browse files
Merge 4.4 into 4.5 (mongodb#3007)
2 parents 88de735 + 4940d80 commit e79b0ae

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

.github/workflows/static-analysis.yml

+15-1
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:
@@ -58,12 +63,21 @@ jobs:
5863
5964
- name: Run PHPStan
6065
run: ./vendor/bin/phpstan analyse --no-interaction --no-progress --ansi --error-format=sarif > phpstan.sarif
66+
continue-on-error: true
6167

6268
- name: "Upload SARIF report"
63-
if: always()
69+
if: ${{ github.event_name != 'workflow_dispatch' }}
70+
uses: "github/codeql-action/upload-sarif@v3"
71+
with:
72+
sarif_file: phpstan.sarif
73+
74+
- name: "Upload SARIF report"
75+
if: ${{ github.event_name == 'workflow_dispatch' }}
6476
uses: "github/codeql-action/upload-sarif@v3"
6577
with:
6678
sarif_file: phpstan.sarif
79+
ref: ${{ inputs.ref }}
80+
sha: ${{ env.CHECKED_OUT_SHA }}
6781

6882
- name: Save cache PHPStan results
6983
id: phpstan-cache-save

0 commit comments

Comments
 (0)