Skip to content

Commit 4aa1426

Browse files
committed
build: ensure PR repo and branch are checked out
1 parent 2507d8e commit 4aa1426

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

.github/workflows/run_tests_coverage.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,12 @@ jobs:
104104

105105
# Specify whether to download Git-LFS files:
106106
lfs: false
107+
108+
# Checkout PR branch if triggered by a pull request:
109+
ref: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || '' }}
110+
111+
# Checkout PR repository (to properly work with forks) if triggered by a pull request:
112+
repository: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name || github.repository }}
107113
timeout-minutes: 10
108114

109115
# Install Node.js:

0 commit comments

Comments
 (0)