-
Notifications
You must be signed in to change notification settings - Fork 20
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
Push images and caches to github.repository_owner
#193
Conversation
Do you plan to implement these updates to Cycamore and Cyclus as well? I know on Cyclus we have to have PRs from the cyclus repo because of pushing the images. |
Yes I plan to implement these updates in the other repos. They will need some additional changes because they perform downstream testing. I also need to figure out how to add the PR comments, I now see that those permissions are also scoped to the upstream repo. Working on it now, will move this PR out of draft when ready |
I should have flagged this in my review since we've seen it in other repos in the past, and maybe even the prior CI strategy here - any pushes to GHCR have to come from branches on the upstream repo. What if we change the location for caching to be the author rather than the repo_owner? It pushes some CI load to the author's account, but for open repos that shouldn't matter? Some collaborators have been annoyed by this in the past, but it seems like the best choice.... |
Do you suggest that we push EDIT: Answer to my own question - we will have to just load them locally since the Dockerfiles are written to pull |
github.repository_owner
arbitrary change
Current implementation pushes all images/caches to the Unfortunately getting PR comments to work correctly required a more sophisticated approach. PRs originating from a fork do not have permission to write to the upstream. One workaround I explored was using the We won't see the workflows pass until this is merged to |
Is this ready for review @bennibbelink ? |
This is certainly getting complicated!!! |
This all makes sense to me, so I'll merge and we'll see how it all rolls together. |
Should solve an issue discovered by @abachma2 in #184. Forks of cymetric do not have permission to push to the cyclus GHCR. Adding the
ignore-error
parameter to--cache-to
should let the workflow continue without error when this happens. This should not have a significant impact the efficacy of our caching strategy since caches will be pushed whenever the workflow is run from the upstream repositorycyclus/cymetric
.I intentionally did not include this parameter in
publish_latest.yml
andpublish_release.yml
. Those workflows need to push to GHCR to publish images. They will publish official images when run from the upstream repo, but any changes to the workflow should come from a branch off the upstream (NOT from a fork, otherwise this 403 forbidden will occur) because on a PR it will publish irrelevant images tagged:ci-image-cache
to prove functionality of the workflow