Skip to content

Commit 71e3a3e

Browse files
committed
fix
1 parent 60d969e commit 71e3a3e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.github/workflows/preview-build.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ jobs:
6666
id: deployment
6767
env:
6868
PR_NUMBER: ${{ github.event.pull_request.number }}
69-
REF: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.ref_name }}
69+
REF: ${{ startsWith(github.event_name, 'pull_request') && github.event.pull_request.head.sha || github.ref_name }}
7070
with:
7171
result-encoding: string
7272
script: |
@@ -100,9 +100,15 @@ jobs:
100100
GITHUB_REF_NAME: ${{ github.ref_name }}
101101
run: |
102102
case "${GITHUB_EVENT_NAME}" in
103+
"merge_group")
104+
echo "PATH_PREFIX=/${GITHUB_REPOSITORY}/pull/${PR_NUMBER}" >> $GITHUB_ENV
105+
;;
103106
"pull_request_target")
104107
echo "PATH_PREFIX=/${GITHUB_REPOSITORY}/pull/${PR_NUMBER}" >> $GITHUB_ENV
105108
;;
109+
"pull_request")
110+
echo "PATH_PREFIX=/${GITHUB_REPOSITORY}/pull/${PR_NUMBER}" >> $GITHUB_ENV
111+
;;
106112
"push")
107113
echo "PATH_PREFIX=/${GITHUB_REPOSITORY}/tree/${GITHUB_REF_NAME}" >> $GITHUB_ENV
108114
if [[ ! "${GITHUB_REF_NAME}" =~ ^(main|master|16\.x)$ ]]; then

0 commit comments

Comments
 (0)