Skip to content

Commit 00d18c2

Browse files
authored
Merge pull request #328 from radofuchs/e2e_job_PR_setup
LCORE-306: use proper commit for PRs and pushes
2 parents e698a95 + cff0e34 commit 00d18c2

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

.github/workflows/e2e_tests.yaml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,17 @@ jobs:
1212
steps:
1313
- uses: actions/checkout@v4
1414
with:
15-
ref: ${{ github.event.pull_request.head.sha }}
15+
# On PR_TARGET → the fork (or same repo) that opened the PR.
16+
# On push → falls back to the current repository.
17+
repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
18+
19+
# On PR_TARGET → the PR head *commit* (reproducible).
20+
# On push → the pushed commit that triggered the workflow.
21+
ref: ${{ github.event.pull_request.head.sha || github.sha }}
22+
23+
fetch-depth: 0
24+
# Don’t keep credentials when running untrusted PR code under PR_TARGET.
25+
persist-credentials: ${{ github.event_name != 'pull_request_target' }}
1626

1727
- uses: 1arp/[email protected]
1828
env:

0 commit comments

Comments
 (0)