Skip to content

Commit 6ae2f4b

Browse files
committed
chore: trigger action from forks
1 parent bd8d465 commit 6ae2f4b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.github/workflows/preview-release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
(
3939
github.event_name == 'workflow_dispatch' ||
4040
github.event_name == 'push' ||
41-
(github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'trigger: preview'))
41+
(github.event_name == 'pull_request_target' && contains(github.event.pull_request.labels.*.name, 'trigger: preview'))
4242
)
4343
runs-on: ubuntu-latest
4444
outputs:
@@ -122,7 +122,7 @@ jobs:
122122
triggering_pr: prNumber.toString(),
123123
preview_url: '${{ needs.preview.outputs.preview-url }}',
124124
package_name: '${{ needs.preview.outputs.package-name }}',
125-
triggering_sha: context.eventName === 'pull_request' ? context.payload.pull_request.head.sha : context.sha
125+
triggering_sha: context.eventName === 'pull_request_target' ? context.payload.pull_request.head.sha : context.sha
126126
}
127127
});
128128
@@ -134,7 +134,7 @@ jobs:
134134
}
135135
136136
- name: Find existing preview comment
137-
if: github.event_name == 'pull_request'
137+
if: github.event_name == 'pull_request_target'
138138
uses: peter-evans/find-comment@v3
139139
id: find-comment
140140
with:
@@ -144,7 +144,7 @@ jobs:
144144
body-includes: '<!-- functions-js-preview-status -->'
145145

146146
- name: Create or update preview comment
147-
if: github.event_name == 'pull_request'
147+
if: github.event_name == 'pull_request_target'
148148
uses: peter-evans/create-or-update-comment@v4
149149
with:
150150
token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)