|
64 | 64 | max-allowed-issues: 2147483647 |
65 | 65 |
|
66 | 66 | # Upload the SARIF file generated in the previous step |
67 | | - - name: Upload SARIF results file |
| 67 | +# - name: Upload SARIF results file |
| 68 | +# uses: github/codeql-action/upload-sarif@v3 |
| 69 | +# with: |
| 70 | +# sarif_file: results.sarif |
| 71 | +# Split SARIF: eine Datei pro 'run' (GitHub erlaubt seit 2025-07 keine mehrfachen Runs je Kategorie) |
| 72 | + - name: Split SARIF into single-run files |
| 73 | + shell: bash |
| 74 | + run: | |
| 75 | + set -euo pipefail |
| 76 | + mkdir -p sarif_split |
| 77 | + runs=$(jq '.runs | length' results.sarif) |
| 78 | + for ((i=0; i<runs; i++)); do |
| 79 | + jq --argjson i "$i" '{ "$schema": ."$schema", "version": .version, runs: [ .runs[$i] ] }' results.sarif > "sarif_split/run-$i.sarif" |
| 80 | + done |
| 81 | +
|
| 82 | + - name: Upload SARIF run 0 |
| 83 | + if: ${{ hashFiles('sarif_split/run-0.sarif') != '' }} |
| 84 | + uses: github/codeql-action/upload-sarif@v3 |
| 85 | + with: |
| 86 | + sarif_file: sarif_split/run-0.sarif |
| 87 | + category: codacy-run-0 |
| 88 | + |
| 89 | + - name: Upload SARIF run 1 |
| 90 | + if: ${{ hashFiles('sarif_split/run-1.sarif') != '' }} |
| 91 | + uses: github/codeql-action/upload-sarif@v3 |
| 92 | + with: |
| 93 | + sarif_file: sarif_split/run-1.sarif |
| 94 | + category: codacy-run-1 |
| 95 | + |
| 96 | + - name: Upload SARIF run 2 |
| 97 | + if: ${{ hashFiles('sarif_split/run-2.sarif') != '' }} |
| 98 | + uses: github/codeql-action/upload-sarif@v3 |
| 99 | + with: |
| 100 | + sarif_file: sarif_split/run-2.sarif |
| 101 | + category: codacy-run-2 |
| 102 | + |
| 103 | + - name: Upload SARIF run 3 |
| 104 | + if: ${{ hashFiles('sarif_split/run-3.sarif') != '' }} |
68 | 105 | uses: github/codeql-action/upload-sarif@v3 |
69 | 106 | with: |
70 | | - sarif_file: results.sarif |
| 107 | + sarif_file: sarif_split/run-3.sarif |
| 108 | + category: codacy-run-3 |
0 commit comments