SARIF code scanning
Use the GitHub Action with the following inputs to publish validation diagnostics to GitHub code scanning.
with: format: sarif upload-sarif: trueGrant the job security-events: write and contents: read, and make sure code scanning is available for the repository. The action uploads the report before it fails a job for validation errors.
For an existing CI job that uploads its own report, generate the file with the command line. A validation failure can still produce a report, so allow the upload step to run after the checker exits.