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
This commit is contained in:
Blue 2025-01-31 11:46:53 -08:00 committed by GitHub
parent eb32e8c988
commit bcd5e2ab47
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,7 +1,7 @@
name: Validate tar based distributions
on:
pull_request_target:
pull_request:
paths: ['distributions/**']
jobs:
@ -11,19 +11,10 @@ jobs:
permissions:
pull-requests: write
steps:
- name: Checkout official repo
uses: actions/checkout@v4
with:
repository: 'microsoft/WSL'
ref: master
fetch-depth: 0
- name: Checkout repo
uses: actions/checkout@v4
with:
ref: refs/pull/${{ github.event.pull_request.number }}/merge
fetch-depth: 0
path: source_repo
- name: Install pip packages
run: pip install -r distributions/requirements.txt
@ -34,7 +25,7 @@ jobs:
python distributions/validate-modern.py \
--repo-path . \
--compare-with-branch 'origin/${{ github.base_ref }}' \
--manifest source_repo/distributions/DistributionInfo.json \
--manifest distributions/DistributionInfo.json \
--github-token '${{ secrets.GITHUB_TOKEN }}' \
--github-pr '${{ github.event.pull_request.number }}' \
--github-commit '${{ github.sha }}'