Skip to content

fix(ci): Add allow-unsafe-pr-checkout to support fork PR checkouts#329

Open
Moonwalker-rgb wants to merge 1 commit into
AetherEdu:mainfrom
Moonwalker-rgb:fix/ci-fork-checkout
Open

fix(ci): Add allow-unsafe-pr-checkout to support fork PR checkouts#329
Moonwalker-rgb wants to merge 1 commit into
AetherEdu:mainfrom
Moonwalker-rgb:fix/ci-fork-checkout

Conversation

@Moonwalker-rgb

Copy link
Copy Markdown
Contributor

Problem

GitHub's actions/checkout@v4 now blocks fork PR code checkout in pull_request_target workflows as a security measure. All CI jobs fail within seconds with:

Refusing to check out fork pull request code from a 'pull_request_target' workflow.
Set 'allow-unsafe-pr-checkout: true' on the actions/checkout step.

Fix

Added allow-unsafe-pr-checkout: true and repository field to all 4 actions/checkout@v4 steps in .github/workflows/ci.yml.

This allows fork PRs (like #328) to run CI successfully.

…t fork PRs

GitHub's actions/checkout@v4 now requires explicit opt-in via
allow-unsafe-pr-checkout: true to checkout fork PR code in
pull_request_target workflows. Without this, all CI jobs fail
for PRs from forks.

Also added repository field to fetch from the fork's repo.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant