Skip to content

Commit

Permalink
fix(github/ci): Checkout correct repo and branch on PR open
Browse files Browse the repository at this point in the history
It seems like that since the introduction of CI Checks for Pull Requests, the Action run has always checked out the upstreams main branch instead of the PR branch of the fork. This fixes that.
  • Loading branch information
tens0rfl0w committed Nov 1, 2024
1 parent 37b6ac9 commit 4575489
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ jobs:
# Call each git command individually, preventing unnecessary checkouts
git init .
git config core.symlinks true
git remote add origin https://github.com/$GITHUB_REPOSITORY.git
git pull origin $GITHUB_REF:PR_BRANCH --depth=1
git remote add origin ${{ github.event.pull_request.head.repo.clone_url }}
git pull origin ${{github.event.pull_request.head.ref}} --depth=1
git submodule update --jobs=$JOB_SLOTS --init --depth=1
- name: Dependencies
Expand Down

0 comments on commit 4575489

Please sign in to comment.