File tree Expand file tree Collapse file tree 1 file changed +1
-34
lines changed
Expand file tree Collapse file tree 1 file changed +1
-34
lines changed Original file line number Diff line number Diff line change 1616 types : [completed]
1717
1818jobs :
19- download-if-workflow-run :
20- runs-on : ubuntu-latest
21- outputs :
22- pr_number : ${{ steps.pr_output.outputs.pr_number }}
23- pr_sha : ${{ steps.pr_output.outputs.pr_sha }}
24- # if conditions on all individual steps because subsequent jobs depend on this job
25- # and we cannot skip it entirely
26- steps :
27- - name : ' Download workflow_run artifact'
28- if : github.event_name == 'workflow_run'
29- uses : dawidd6/action-download-artifact@v9
30- with :
31- run_id : ${{ github.event.workflow_run.id }}
32- name : pr_info
33- path : pr/
34- search_artifacts : true
35-
36- - name : ' Determine PR info'
37- # PR info comes from the artifact if downloaded, or GitHub context if not.
38- if : github.event_name == 'workflow_run'
39- id : ' pr_output'
40- run : |
41- if [[ ! -f pr/pr_number ]]; then
42- echo "${{ github.event.pull_request.number }}" > pr/pr_number
43- fi
44- if [[ ! -f pr/pr_sha ]]; then
45- echo "${{ github.event.pull_request.head.sha }}" > pr/pr_sha
46- fi
47- cat pr/*
48- echo "pr_number=$(cat pr/pr_number)" >> "$GITHUB_OUTPUT"
49- echo "pr_sha=$(cat pr/pr_sha)" >> "$GITHUB_OUTPUT"
50-
5119 run-security-guardian :
5220 # Necessary to have sufficient permissions to write to the PR
5321 permissions :
5422 contents : read
55- pull-requests : write
23+ pull-requests : read
5624 statuses : read
5725 issues : read
5826 checks : read
5927 runs-on : ubuntu-latest
60- needs : download-if-workflow-run
6128 steps :
6229 - name : Checkout
6330 uses : actions/checkout@v4
You can’t perform that action at this time.
0 commit comments