ci: check out fork pull requests through refs/pull (#155)
This commit is contained in:
1 parent
499d20fdb3
commit
70449971cb
1 file changed
+5
-2
@@ -9,7 +9,7 @@ permissions:
|
|||||||
contents: write
|
contents: write
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ci-${{ github.head_ref || github.ref }}
|
group: ci-${{ github.event.pull_request.number || github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@@ -45,7 +45,10 @@ jobs:
|
|||||||
submodules: recursive
|
submodules: recursive
|
||||||
# On pull requests check out the branch itself, not the detached merge
|
# On pull requests check out the branch itself, not the detached merge
|
||||||
# commit, so the formatting commit can be pushed back.
|
# commit, so the formatting commit can be pushed back.
|
||||||
ref: ${{ github.head_ref || github.sha }}
|
ref: >-
|
||||||
|
${{ github.event_name != 'pull_request' && github.sha
|
||||||
|
|| github.event.pull_request.head.repo.full_name == github.repository && github.head_ref
|
||||||
|
|| format('refs/pull/{0}/head', github.event.pull_request.number) }}
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Set up JDK 25
|
- name: Set up JDK 25
|
||||||
|
|||||||
Reference in new issue
Block a user