-
Notifications
You must be signed in to change notification settings - Fork 16
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
CI jobs fail on forked repositories #4
Comments
I came up with 3 options for this. The main motivation to disable CI on forked repositories is to avoid making contributors confuse. For that reason, 2 is the most reasonable of them for me. 1. Skip each job on forked repositories and make the run successful.Like this: hibariya/checkout-single-subscription@2a65fbf 2. Run only push events to master branches and decrease CI runs on forked repositories.Like this: hibariya/checkout-single-subscription@9e61427 3. Cancel CI jobs when the repository is forked oneLike this: https://github.jparrowsec.cnmunity/t/is-there-a-way-to-cancel-a-running-workflow-within-one-of-its-jobs/17493/4 |
I think number 2 is okay for now. And I think if someone is pushing to master on their forked repo that it might be valuable? |
For option 2, would CI fail when they push to their own repo? |
It would fail if they push to master on their own repo. When they push to other branches, CI would not run. |
According to Github's document, workflows triggered by forked repositories are not able to fetch secrets of their upstream repository for security reasons.
https://docs.github.com/en/actions/reference/encrypted-secrets#using-encrypted-secrets-in-a-workflow
For that reason, the following have failed.
As long as the CI requires secrets, workflows should not be triggered on forked repositories.
The text was updated successfully, but these errors were encountered: