You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+6-2Lines changed: 6 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -61,6 +61,9 @@ github-token:
61
61
github-environment:
62
62
description: 'GitHub environment to deploy to. You need to manually create this for the github repo'
63
63
required: true
64
+
pr-number:
65
+
description: 'GitHub pull request number to comment on. If not set, the action auto-detects from the event payload.'
66
+
required: false
64
67
working-directory:
65
68
description: 'Directory to run wrangler cli from'
66
69
required: false
@@ -136,7 +139,7 @@ jobs:
136
139
137
140
### Fork pull requests with `workflow_run`
138
141
139
-
When pull requests come from forks, the initial `pull_request` workflow may not have access to secrets. Use a second workflow triggered by `workflow_run` to deploy from the original repository context after approval.
142
+
When pull requests come from forks, the initial `pull_request` workflow may not have access to secrets. Use a second workflow triggered by `workflow_run` to deploy from the original repository context after approval, and set the `pr-number` input so the action can resolve the correct pull request to comment on.
140
143
141
144
```yaml
142
145
name: Deploy PR Preview (Fork Safe)
@@ -168,9 +171,10 @@ jobs:
168
171
directory: dist
169
172
github-token: ${{ secrets.GITHUB_TOKEN }}
170
173
github-environment: preview
174
+
pr-number: # The PR number
171
175
```
172
176
173
-
This action supports the `workflow_run` event and will use the `workflow_run` head commit SHA and branch for deployment metadata and PR comments.
177
+
This action supports the `workflow_run` event and will use the `workflow_run` head commit SHA and branch for deployment metadata.
0 commit comments