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

PRs from forks are not running GitHub Actions properly #2556

Open
kimadactyl opened this issue Aug 14, 2024 — with Huly for GitHub · 4 comments · May be fixed by #2685
Open

PRs from forks are not running GitHub Actions properly #2556

kimadactyl opened this issue Aug 14, 2024 — with Huly for GitHub · 4 comments · May be fixed by #2685

Comments

Copy link
Member

kimadactyl commented Aug 14, 2024

Description

2 new contributors have done PRs from forks and GitHub isn't loading properly. The below action just never starts. A Google I did before hinted this is something to do with our key config, but leaving here for further investigation.

Screenshot 2024-08-13 at 21 50 26

Promising stackoverflow answer here: https://stackoverflow.com/a/69169858

Motivation

We want to have people contribute to the repo without needing to add them into our org.

@kimadactyl
Copy link
Member Author

@kimadactyl
Copy link
Member Author

@erbridge / @pedantic-git - not sure if you can shed any light on this im feeling very out my depth

@pedantic-git
Copy link

Here's my guess:

Currently your workflow is set to on push. A PR in a fork never pushes to your repo so the workflow is never activated. I think you need to add that pull_request_target but I'm not sure if that will cause double-activation for PRs in your own repo.

Afaik there's no way for forks to kick off workflows automatically (because an attacker could fork your repo just to use up all your GHA minutes) but hopefully changing that will at least cause the approval button to appear.

@JessFairbairn JessFairbairn linked a pull request Feb 12, 2025 that will close this issue
6 tasks
@JessFairbairn
Copy link

This SO answer suggests maybe using pull_request rather than pull_request_target unless it's necessary for accessing keys. As only the deploy steps need secrets maybe that's unnecessary?

#2685 experimented with a pull request here

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 a pull request may close this issue.

3 participants