Skip to content

Commit d719ee1

Browse files
ci: fix prerelease comment job to also run when only pages-shared has changed (#3671)
1 parent c3ff1c2 commit d719ee1

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

.github/extract-pr-and-workflow-id.js

-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,5 @@ for (const artifact of allArtifacts.data.artifacts) {
1717
`\nWORKFLOW_RUN_PR_FOR_${packageName}=${match[2]}` +
1818
`\nWORKFLOW_RUN_ID_FOR_${packageName}=${context.payload.workflow_run.id}`
1919
);
20-
break;
2120
}
2221
}

.github/workflows/write-prerelease-comment.yml

+6-2
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,13 @@ jobs:
3838
}
3939
4040
- name: "Comment on PR with Wrangler link"
41+
env:
42+
WORKFLOW_RUN_PR_FOR_WRANGLER: ${{env.WORKFLOW_RUN_PR_FOR_WRANGLER || env.WORKFLOW_RUN_PR_FOR_CLOUDFLARE-PAGES-SHARED}}
43+
WORKFLOW_RUN_ID_FOR_WRANGLER: ${{env.WORKFLOW_RUN_ID_FOR_WRANGLER || env.WORKFLOW_RUN_ID_FOR_CLOUDFLARE-PAGES-SHARED}}
44+
4145
uses: marocchino/sticky-pull-request-comment@v2
4246
with:
43-
number: ${{ env.WORKFLOW_RUN_PR_FOR_WRANGLER }}
47+
number: ${{ env.WORKFLOW_RUN_PR_FOR_WRANGLER}}
4448
message: |
4549
A wrangler prerelease is available for testing. You can install this latest build in your project with:
4650
@@ -51,7 +55,7 @@ jobs:
5155
You can reference the automatically updated head of this PR with:
5256
5357
```sh
54-
npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/prs/${{ env.WORKFLOW_RUN_PR_FOR_WRANGLER }}/npm-package-wrangler-${{ env.WORKFLOW_RUN_PR_FOR_WRANGLER }}
58+
npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/prs/${{ env.WORKFLOW_RUN_ID_FOR_WRANGLER }}/npm-package-wrangler-${{ env.WORKFLOW_RUN_PR_FOR_WRANGLER }}
5559
```
5660
5761
Or you can use `npx` with this latest build directly:

0 commit comments

Comments
 (0)