Skip to content

Commit 782b14f

Browse files
authored
Fix workflow for pull_request_target checkout (#369)
1 parent 57467a5 commit 782b14f

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

.github/workflows/ci_build_test.yaml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,11 @@ jobs:
3030
needs:
3131
- workflow_approval
3232
steps:
33-
- uses: actions/checkout@v3
33+
- name: Checkout
34+
uses: actions/checkout@v3
35+
with:
36+
ref: ${{github.event.pull_request.head.sha}}
37+
repository: ${{github.event.pull_request.head.repo.full_name}}
3438
- name: run fossa anlyze and create report
3539
run: |
3640
curl -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/fossas/fossa-cli/master/install-latest.sh | bash
@@ -56,7 +60,11 @@ jobs:
5660
name: security-sast-semgrep
5761
if: github.actor != 'dependabot[bot]'
5862
steps:
59-
- uses: actions/checkout@v3
63+
- name: Checkout
64+
uses: actions/checkout@v3
65+
with:
66+
ref: ${{github.event.pull_request.head.sha}}
67+
repository: ${{github.event.pull_request.head.repo.full_name}}
6068
- name: Semgrep
6169
id: semgrep
6270
uses: returntocorp/semgrep-action@v1
@@ -71,6 +79,9 @@ jobs:
7179
steps:
7280
- name: Checkout
7381
uses: actions/checkout@v2
82+
with:
83+
ref: ${{github.event.pull_request.head.sha}}
84+
repository: ${{github.event.pull_request.head.repo.full_name}}
7485

7586
- name: Get maven dependencies
7687
run: |
@@ -139,6 +150,9 @@ jobs:
139150
steps:
140151
- name: Checkout
141152
uses: actions/checkout@v2
153+
with:
154+
ref: ${{github.event.pull_request.head.sha}}
155+
repository: ${{github.event.pull_request.head.repo.full_name}}
142156

143157
- name: Install Splunk
144158
run: |
@@ -333,4 +347,4 @@ jobs:
333347
if: failure()
334348
with:
335349
name: splunk-events-${{ matrix.kafka_version }}
336-
path: events.txt
350+
path: events.txt

0 commit comments

Comments
 (0)