Change the modern distribution workflow to use pull_request: (#12534)
* Change the modern distribution workflow to use pull_request instead of pull_request_target * Add dummy change * Use local path * Undo test change
Blue committed
Jan 31, 2025 at 11:46 UTC
bcd5e2ab4772b1daea6112cd65531badec2e3ed2
1 file changed
+2
-11
.github/workflows/modern-distributions.yml
+2
-11
@@ -1,7 +1,7 @@
1
name: Validate tar based distributions
2
3
on:
4
- pull_request_target:
4
+ pull_request:
5
paths: ['distributions/**']
6
7
jobs:
@@ -11,19 +11,10 @@ jobs:
11
permissions:
12
pull-requests: write
13
steps:
14
- - name: Checkout official repo
15
- uses: actions/checkout@v4
16
- with:
17
- repository: 'microsoft/WSL'
18
- ref: master
19
- fetch-depth: 0
20
-
14
- name: Checkout repo
15
uses: actions/checkout@v4
16
with:
24
- ref: refs/pull/${{ github.event.pull_request.number }}/merge
17
fetch-depth: 0
26
- path: source_repo
18
19
- name: Install pip packages
20
run: pip install -r distributions/requirements.txt
@@ -34,7 +25,7 @@ jobs:
25
python distributions/validate-modern.py \
26
--repo-path . \
27
--compare-with-branch 'origin/${{ github.base_ref }}' \
37
- --manifest source_repo/distributions/DistributionInfo.json \
28
+ --manifest distributions/DistributionInfo.json \
29
--github-token '${{ secrets.GITHUB_TOKEN }}' \
30
--github-pr '${{ github.event.pull_request.number }}' \
31
--github-commit '${{ github.sha }}'