-
Notifications
You must be signed in to change notification settings - Fork 0
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 break #44
Comments
Closed
Just coming back to this since forever and trying to re-understand it and figure out where we are
|
fritx
added a commit
to fritx/jsonmerge
that referenced
this issue
Jan 22, 2024
https://github.com/marketplace/actions/git-auto-commit#use-in-forks-from-public-repositories stefanzweifel/git-auto-commit-action#211 https://github.com/orgs/community/discussions/26829#discussioncomment-3253580 winglang/wing#5115 pyiron/actions#44 UffizziCloud/preview-action#80 ASFHyP3/hyp3-isce2#179 tveastman/secateur#54 stm32-rs/stm32-rs#949 actions/gh-actions-cache#73
fritx
added a commit
to Jayin/jsonmerge
that referenced
this issue
Jan 22, 2024
https://github.com/marketplace/actions/git-auto-commit#use-in-forks-from-public-repositories stefanzweifel/git-auto-commit-action#211 https://github.com/orgs/community/discussions/26829#discussioncomment-3253580 winglang/wing#5115 pyiron/actions#44 UffizziCloud/preview-action#80 ASFHyP3/hyp3-isce2#179 tveastman/secateur#54 stm32-rs/stm32-rs#949 actions/gh-actions-cache#73
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
After applying the centralized CI to pyiron_contrib, the dependabot PRs revealed that the current automated update to docs and binder environment files breaks for third-party PRs, e.g.:
Going back and re-reading the security docs confirmed our suspicion that the secrets are not getting passed nor is write permission available from external forks using
on: pull_request
. We do get these powers in the dependabot PR because that is explicitlyon: pull_request_target
.So before pyiron_contrib was on the centralized CI, the only place that got third-party write access and secrets was the dependabot workflow. Now, under the centralized CI we are expecting these privileges in the main
on: pull_request
workflow in order to keep thedocs/environment.yml
and.binder/environment.yml
files synchronized with.ci_support/environment.yml
(plus the extra stuff we need for docs/notebooks).The advantage to the centralized CI way is that we never need to modify the docs and binder environments, they are just always kept up-to-date.
One solution:
on: pull_request_target
scriptneeds: commit-updated-env
from the rest of the CI steps in the main push-pull workflowThen dependabot can update all the env files it needs to, the dependent env-files stay (almost always) up-to-date, and the rest of the CI is free to run even on third-party PRs.
If you like it, I'll take care of implementation, but I wanted to solicit feedback on the plan first.
The text was updated successfully, but these errors were encountered: