Skip to content

Commit d0f3e9b

Browse files
committed
.github/workflows: update qa-symlink to use pull_request_target
This should allow the script to run even when a PR is submitted by an external contributor. Signed-off-by: Patrick Donnelly <[email protected]>
1 parent dcf27b9 commit d0f3e9b

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

.github/workflows/qa-symlink.yml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
name: "Check for missing .qa links"
33
on:
4-
pull_request:
4+
pull_request_target:
55
types:
66
- opened
77
- synchronize
@@ -12,18 +12,20 @@ jobs:
1212
pull_request:
1313
name: "Check for missing .qa links"
1414
runs-on: ubuntu-latest
15+
if: github.repository == 'ceph/ceph'
1516
steps:
16-
- name: checkout PR HEAD
17-
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
17+
- name: Checkout main branch for pull_request_target
18+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1819
with:
19-
path: head
20+
ref: 'refs/heads/main'
21+
path: main
2022

21-
- name: checkout base
22-
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
23+
- name: checkout PR HEAD
24+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2325
with:
24-
path: base
25-
ref: ${{ github.base_ref }}
26+
ref: ${{ github.event.pull_request.head.sha }}
27+
path: pull_request
2628

2729
- name: verify .qa links
28-
run: ../base/src/script/verify-qa
29-
working-directory: head/
30+
run: ../main/src/script/verify-qa
31+
working-directory: pull_request/

0 commit comments

Comments
 (0)