Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable running workflows from forks #2498

Merged
merged 1 commit into from
Jan 26, 2024
Merged

Conversation

nickcharlton
Copy link
Member

@nickcharlton nickcharlton commented Jan 26, 2024

The simple push event doesn't support pull requests from forks where
the author doesn't already have write access to the repository.

This adds the default set of events on the pull_request event which
lets forks run the test suite.

In addition, this expands that pattern to our other workflows
(bundle-audit and codeql-analysis), whilst restricting the push
workflow to only occur on main (which should mean re-triggering
workflows on merge). This is to stop duplicating the builds when
triggered by an actor with write access.

https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request https://securitylab.github.com/research/github-actions-preventing-pwn-requests

@nickcharlton
Copy link
Member Author

This was tested on #2495, and then I cherry-picked that commit over. It's not possible to test it myself 🙃.

The simple `push` event doesn't support pull requests from forks where
the author doesn't already have write access to the repository.

This adds the default set of events on the `pull_request` event which
lets forks run the test suite.

In addition, this expands that pattern to our other workflows
(`bundle-audit` and `codeql-analysis`), whilst restricting the `push`
workflow to only occur on `main` (which should mean re-triggering
workflows on merge). This is to stop duplicating the builds when
triggered by an actor with write access.

https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request
https://securitylab.github.com/research/github-actions-preventing-pwn-requests
@nickcharlton nickcharlton force-pushed the nc-enable-running-from-forks branch from 829cb3f to daeb414 Compare January 26, 2024 12:50
@nickcharlton nickcharlton merged commit 961ad82 into main Jan 26, 2024
9 checks passed
@nickcharlton nickcharlton deleted the nc-enable-running-from-forks branch January 26, 2024 12:57
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