Skip to content

Unblock fork preview deploys by opting into secure fork checkout in pull_request_target - #354

Merged
andrewccard merged 2 commits into
mainfrom
copilot/fix-deploy-fork-preview
Aug 22, 2026
Merged

Unblock fork preview deploys by opting into secure fork checkout in pull_request_target#354
andrewccard merged 2 commits into
mainfrom
copilot/fix-deploy-fork-preview

Conversation

Copilot AI commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Fork PR Preview started failing in the Deploy fork preview job after GitHub Actions enforced a new safety gate for fork checkouts in pull_request_target workflows. The workflow was attempting to checkout fork HEAD code without the required explicit opt-in.

  • Root cause

    • actions/checkout@v4 now refuses fork PR checkout in pull_request_target unless allow-unsafe-pr-checkout is explicitly enabled.
  • Workflow update

    • Updated .github/workflows/fork-preview.yml checkout step to opt in for this specific trusted preview flow.
    • Kept the change scoped to the single failing job path.
  • Resulting behavior

    • Deploy fork preview can again fetch fork PR source (head.repo + head.sha) and proceed with build/upload/comment steps.
- name: Check out pull request
  uses: actions/checkout@v4
  with:
    repository: ${{ github.event.pull_request.head.repo.full_name }}
    ref: ${{ github.event.pull_request.head.sha }}
    allow-unsafe-pr-checkout: true

Co-authored-by: andrewccard <34358667+andrewccard@users.noreply.github.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
frcdesign f1edb5c Commit Preview URL

Branch Preview URL
Aug 22 2026, 05:36 PM

Copilot AI changed the title [WIP] Fix failing GitHub Actions job Deploy fork preview Unblock fork preview deploys by opting into secure fork checkout in pull_request_target Aug 22, 2026
Copilot AI requested a review from andrewccard August 22, 2026 17:31
@andrewccard
andrewccard deployed to cloudflare-preview August 22, 2026 17:32 — with GitHub Actions Active
@github-actions

Copy link
Copy Markdown

Cloudflare preview for this PR:

https://pr-354-frcdesign.frcdesign-org.workers.dev

This preview updates when the PR changes while the deploy-preview label remains present.

@andrewccard
andrewccard marked this pull request as ready for review August 22, 2026 17:36
@andrewccard
andrewccard merged commit bf97fe2 into main Aug 22, 2026
4 checks passed
@andrewccard
andrewccard deleted the copilot/fix-deploy-fork-preview branch August 22, 2026 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants