Merge pull request #6947 from pixelfed/shleeable-patch-1

Update php-psalm.yml
pull/6783/head^2
Shlee 4 weeks ago committed by GitHub
commit f710b5eee8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -1,10 +1,12 @@
name: PHP - Psalm
on:
push:
branches: [staging, dev, unstable]
pull_request:
branches: [staging, dev, unstable]
# Disabled for now.. too many errors
on: []
# on:
# push:
# branches: [staging, dev, unstable]
# pull_request:
# branches: [staging, dev, unstable]
permissions:
contents: read
@ -54,25 +56,25 @@ jobs:
- name: Run Psalm (type analysis, report only)
run: vendor/bin/psalm --output-format=github --report=psalm.sarif.json || true
# # Psalm only writes the SARIF file when it runs far enough to produce a report.
# # If it crashed early (e.g. bad config), skip the upload rather than pushing a
# # blank SARIF, which would clear existing Code Scanning alerts.
# - name: Check for SARIF report
# id: sarif
# if: ${{ !cancelled() }}
# run: |
# if [ -f psalm.sarif.json ]; then
# echo "exists=true" >> "$GITHUB_OUTPUT"
# else
# echo "exists=false" >> "$GITHUB_OUTPUT"
# echo "::warning::Psalm did not produce psalm.sarif.json; skipping Code Scanning upload."
# fi
# Psalm only writes the SARIF file when it runs far enough to produce a report.
# If it crashed early (e.g. bad config), skip the upload rather than pushing a
# blank SARIF, which would clear existing Code Scanning alerts.
- name: Check for SARIF report
id: sarif
if: ${{ !cancelled() }}
run: |
if [ -f psalm.sarif.json ]; then
echo "exists=true" >> "$GITHUB_OUTPUT"
else
echo "exists=false" >> "$GITHUB_OUTPUT"
echo "::warning::Psalm did not produce psalm.sarif.json; skipping Code Scanning upload."
fi
# # Surface findings as Code Scanning alerts on the PR (Security tab). Runs even
# # when the Psalm step failed, but only when a real SARIF file was produced.
# - name: Upload SARIF to Code Scanning
# if: ${{ !cancelled() && steps.sarif.outputs.exists == 'true' }}
# uses: github/codeql-action/upload-sarif@v4
# with:
# sarif_file: psalm.sarif.json
# category: psalm
# Surface findings as Code Scanning alerts on the PR (Security tab). Runs even
# when the Psalm step failed, but only when a real SARIF file was produced.
- name: Upload SARIF to Code Scanning
if: ${{ !cancelled() && steps.sarif.outputs.exists == 'true' }}
uses: github/codeql-action/upload-sarif@v4
with:
sarif_file: psalm.sarif.json
category: psalm

Loading…
Cancel
Save