Skip to content

Commit 1e875e4

Browse files
authored
ci: allow checkout fork PR merge refs (#20203)
1 parent 1440600 commit 1e875e4

3 files changed

Lines changed: 14 additions & 6 deletions

File tree

.github/workflows/cloud.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ jobs:
3030
with:
3131
fetch-depth: 0
3232
ref: "refs/pull/${{ github.event.number }}/merge"
33+
allow-unsafe-pr-checkout: true
3334
- name: Get SHA
3435
shell: bash
3536
id: sha
@@ -62,7 +63,8 @@ jobs:
6263
- uses: actions/checkout@v6
6364
with:
6465
fetch-depth: 0
65-
ref: "refs/pull/${{ github.event.number }}/merge"
66+
ref: ${{ needs.info.outputs.sha }}
67+
allow-unsafe-pr-checkout: true
6668
- name: Build Release
6769
uses: ./.github/actions/build_linux
6870
timeout-minutes: 120

.github/workflows/meta.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ jobs:
2828
with:
2929
fetch-depth: 0
3030
ref: "refs/pull/${{ github.event.number }}/merge"
31+
allow-unsafe-pr-checkout: true
3132
- name: Get SHA
3233
shell: bash
3334
id: sha
@@ -50,7 +51,8 @@ jobs:
5051
- uses: actions/checkout@v6
5152
with:
5253
fetch-depth: 0
53-
ref: "refs/pull/${{ github.event.number }}/merge"
54+
ref: ${{ needs.info.outputs.sha }}
55+
allow-unsafe-pr-checkout: true
5456
- name: Build Release
5557
uses: ./.github/actions/build_linux
5658
timeout-minutes: 60
@@ -70,7 +72,8 @@ jobs:
7072
steps:
7173
- uses: actions/checkout@v6
7274
with:
73-
ref: "refs/pull/${{ github.event.number }}/merge"
75+
ref: ${{ needs.info.outputs.sha }}
76+
allow-unsafe-pr-checkout: true
7477
- name: Download artifact
7578
uses: ./.github/actions/artifact_download
7679
with:

.github/workflows/reuse.benchmark.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ jobs:
6363
- uses: actions/checkout@v6
6464
if: inputs.source == 'pr'
6565
with:
66-
ref: "refs/pull/${{ inputs.source_id }}/merge"
66+
ref: ${{ inputs.sha }}
67+
allow-unsafe-pr-checkout: true
6768
- uses: ./.github/actions/setup_bendsql
6869
- uses: actions/setup-python@v6
6970
with:
@@ -102,7 +103,8 @@ jobs:
102103
- uses: actions/checkout@v6
103104
if: inputs.source == 'pr'
104105
with:
105-
ref: "refs/pull/${{ inputs.source_id }}/merge"
106+
ref: ${{ inputs.sha }}
107+
allow-unsafe-pr-checkout: true
106108
- uses: ./.github/actions/setup_bendsql
107109
- uses: ./.github/actions/benchmark_cloud
108110
if: inputs.target == 'load' || inputs.target == 'all'
@@ -155,7 +157,8 @@ jobs:
155157
- uses: actions/checkout@v6
156158
if: inputs.source == 'pr'
157159
with:
158-
ref: "refs/pull/${{ inputs.source_id }}/merge"
160+
ref: ${{ inputs.sha }}
161+
allow-unsafe-pr-checkout: true
159162
- uses: ./.github/actions/setup_bendsql
160163
- uses: ./.github/actions/benchmark_cloud
161164
if: inputs.target == 'cloud' || inputs.target == 'all'

0 commit comments

Comments
 (0)