Skip to content

Commit b36480d

Browse files
committed
Specify SARIF path via env variable
1 parent 53f80ed commit b36480d

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

.github/workflows/__config-export.yml

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pr-checks/checks/config-export.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,14 @@ steps:
2222
retention-days: 7
2323
- name: Check config properties appear in SARIF
2424
uses: actions/github-script@v6
25+
env:
26+
SARIF_PATH: "${{ runner.temp }}/results/javascript.sarif"
2527
with:
2628
script: |
2729
const fs = require('fs');
2830
const path = require('path');
2931
30-
const sarifFile = path.join('${{ runner.temp }}', 'results', 'javascript.sarif');
31-
const sarif = JSON.parse(fs.readFileSync(sarifFile, 'utf8'));
32+
const sarif = JSON.parse(fs.readFileSync(process.env['SARIF_PATH'], 'utf8'));
3233
const run = sarif.runs[0];
3334
const configSummary = run.properties.codeqlConfigSummary;
3435

0 commit comments

Comments
 (0)