Skip to content
This repository was archived by the owner on Oct 9, 2025. It is now read-only.

Commit d0e7dc2

Browse files
authored
chore: trigger action from forks (#246)
1 parent bd6e2d2 commit d0e7dc2

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
@@ -39,7 +39,7 @@ jobs:
3939
(
4040
github.event_name == 'workflow_dispatch' ||
4141
github.event_name == 'push' ||
42-
(github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'trigger: preview'))
42+
(github.event_name == 'pull_request_target' && contains(github.event.pull_request.labels.*.name, 'trigger: preview'))
4343
)
4444
runs-on: ubuntu-latest
4545
outputs:
@@ -123,7 +123,7 @@ jobs:
123123
triggering_pr: prNumber.toString(),
124124
preview_url: '${{ needs.preview.outputs.preview-url }}',
125125
package_name: '${{ needs.preview.outputs.package-name }}',
126-
triggering_sha: context.eventName === 'pull_request' ? context.payload.pull_request.head.sha : context.sha
126+
triggering_sha: context.eventName === 'pull_request_target' ? context.payload.pull_request.head.sha : context.sha
127127
}
128128
});
129129
@@ -135,7 +135,7 @@ jobs:
135135
}
136136
137137
- name: Find existing preview comment
138-
if: github.event_name == 'pull_request'
138+
if: github.event_name == 'pull_request_target'
139139
uses: peter-evans/find-comment@v3
140140
id: find-comment
141141
with:
@@ -145,7 +145,7 @@ jobs:
145145
body-includes: '<!-- storage-js-preview-status -->'
146146

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

0 commit comments

Comments
 (0)