|
29 | 29 | with:
|
30 | 30 | ref: ${{ github.event_name == 'workflow_dispatch' && inputs.ref || github.ref }}
|
31 | 31 |
|
| 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 | + |
32 | 37 | - name: Setup PHP
|
33 | 38 | uses: shivammathur/setup-php@v2
|
34 | 39 | with:
|
@@ -58,12 +63,21 @@ jobs:
|
58 | 63 |
|
59 | 64 | - name: Run PHPStan
|
60 | 65 | run: ./vendor/bin/phpstan analyse --no-interaction --no-progress --ansi --error-format=sarif > phpstan.sarif
|
| 66 | + continue-on-error: true |
61 | 67 |
|
62 | 68 | - 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' }} |
64 | 76 | uses: "github/codeql-action/upload-sarif@v3"
|
65 | 77 | with:
|
66 | 78 | sarif_file: phpstan.sarif
|
| 79 | + ref: ${{ inputs.ref }} |
| 80 | + sha: ${{ env.CHECKED_OUT_SHA }} |
67 | 81 |
|
68 | 82 | - name: Save cache PHPStan results
|
69 | 83 | id: phpstan-cache-save
|
|
0 commit comments