When uploading the SARIF file to code-ql, the file in the repository is not found:
Preview unavailable
Sorry, we couldn't find this file in the repository.

Workaround
Add the following step before upload-sarif:
- name: Relativize SARIF
shell: bash
run: |
jq ".runs[0].results[].locations[].physicalLocation.artifactLocation.uri |= sub(\"${GITHUB_WORKSPACE}/\"; \"\")" pmd-report.sarif > pmd-report2.sarif
mv -f pmd-report2.sarif pmd-report.sarif