Fix upstreaming of WPT changes

The GitHub Action needs access to Servo repository secrets, so switch to
using the 'pull_request_target' event. Since these PRs have more
complete access to the Servo repository, do not execute the version of
the upstream script that comes with the PR. Instead, simply fetch the
changes. To make this work, the script no longer expects the PR commit
to be checked out, merely that they exist in the repository somewhere.
This commit is contained in:
Martin Robinson 2023-01-24 20:11:55 +01:00
parent 941bd6a579
commit a18baf6719
4 changed files with 30 additions and 10 deletions

View file

@ -1,6 +1,6 @@
name: WPT export
on:
pull_request:
pull_request_target:
types: ['opened', 'synchronize', 'reopened', 'edited', 'closed']
jobs:
@ -16,7 +16,8 @@ jobs:
git init -b main
git remote add origin ${{ github.event.repository.clone_url}}
git fetch origin pull/${{ github.event.pull_request.number}}/head:pr --depth ${{ env.PR_FETCH_DEPTH }}
git checkout pr
git fetch origin master:master --depth 1
git checkout master
- name: Check out wpt
uses: actions/checkout@v3
with: