direct get fork source

This commit is contained in:
qiaofeng1227 2023-07-05 11:24:03 +08:00
parent 499a23def1
commit 37ba593da4

View file

@ -10,14 +10,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Get pull request number
id: pr
run: echo "::set-output name=number::$(jq --raw-output .pull_request.number $GITHUB_EVENT_PATH)"
- name: Fetch all branches
run: git fetch origin '+refs/pull/*/merge:refs/remotes/origin/pr/*'
- name: Fetch pull request branch
run: git fetch origin pull/${{ steps.pr.outputs.number }}/merge
- name: Checkout pull request branch
run: git checkout refs/pull/${{ github.pr_number }}/merge
run: git checkout FETCH_HEAD
- name: Test
run: |