Skip to content

Commit 90cf3d2

Browse files
committed
Add PR check for job run UUID
1 parent de6fe7e commit 90cf3d2

File tree

2 files changed

+114
-0
lines changed

2 files changed

+114
-0
lines changed

.github/workflows/__job-run-uuid-sarif.yml

Lines changed: 84 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: "Job run UUID added to SARIF"
2+
description: "Tests that the job run UUID is added to the SARIF output"
3+
operatingSystems: ["ubuntu"]
4+
versions: ["nightly-latest"]
5+
steps:
6+
- uses: ./../action/init
7+
id: init
8+
with:
9+
languages: javascript
10+
tools: ${{ steps.prepare-test.outputs.tools-url }}
11+
- uses: ./../action/analyze
12+
with:
13+
output: "${{ runner.temp }}/results"
14+
- name: Upload SARIF
15+
uses: actions/upload-artifact@v3
16+
with:
17+
name: ${{ matrix.os }}-${{ matrix.version }}.sarif.json
18+
path: "${{ runner.temp }}/results/javascript.sarif"
19+
retention-days: 7
20+
- name: Check results
21+
shell: bash
22+
run: |
23+
cd "$RUNNER_TEMP/results"
24+
actual=$(jq -r '.runs[0].properties.jobRunUuid' javascript.sarif)
25+
if [[ "$actual" != "$JOB_RUN_UUID" ]]; then
26+
echo "Expected SARIF output to contain job run UUID '$JOB_RUN_UUID', but found '$actual'."
27+
exit 1
28+
else
29+
echo "Found job run UUID '$actual'."
30+
fi

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy