Use pull_request_target for modern distribution changes (#12462)
* Move pull-request permissions to the job instead of the workflow * Use pull_request_target * Undo test change
Blue committed
Jan 14, 2025 at 14:38 UTC
7ef20042e5ea43935de002f1adf3cd38bfa02907
1 file changed
+5
-6
.github/workflows/modern-distributions.yml
+5
-6
@@ -1,23 +1,22 @@
1
name: Validate tar based distributions
2
3
on:
4
- pull_request:
4
+ pull_request_target:
5
paths: ['distributions/**']
6
7
-permissions:
8
- pull-requests: write
9
-
7
jobs:
8
check:
9
name: Validate tar based distributions changes
10
runs-on: ubuntu-latest
11
+ permissions:
12
+ pull-requests: write
13
steps:
14
- name: Checkout repo
15
uses: actions/checkout@v4
17
- with:
16
+ with:
17
+ ref: refs/pull/${{ github.event.pull_request.number }}/merge
18
fetch-depth: 0
19
20
-
20
- name: Install pip packages
21
run: pip install -r distributions/requirements.txt
22
shell: bash