-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
fix(#33711): cross-publish docker images to ghcr.io #34148
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
Conversation
Not sure if you saw this https://blog.gitea.com/docker-registry-update/ but you don't need to use docker.io URLs and it allows us to not have to be tied to yet another provider |
I did not.... I still think that cross-posting to |
Oh no worries. I agree that this is probably still feasible. The workflow might need the permissions block to be added so that the token can have package push permissions. |
Oh..... Yes, I will update the PR soon; thanks for the sanity check |
I couldn't find a reason to use another provider after we cache it ourselves. |
3db8331
to
9807d69
Compare
At least for myself, at my org we have limited access to which container registries we are allowed to pull from; so having the same images cross-posted to both docker hub and github allows us to avoid the rate limiting. |
- name: copy rootful docker image to ghcr.io | ||
# this will also copy both the amd64 and arm64 versions at the same time | ||
run: |- | ||
oras cp --recursive docker.io/gitea/gitea:${{ steps.meta.outputs.tags }} ghcr.io/gitea/gitea:${{ steps.meta.outputs.tags }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why introduce another dependency to the workflow if docker-build-push can already push to multiple locations?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah. I was not aware it could do that, I can update the logic this evening, thank you
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated the PR to remove the oras
dependency and used the docker/metadata-action
action to push both to docker hub and ghcr
The rate limitation of docker hub has been resolved, ref https://blog.gitea.com/docker-registry-update/ |
Signed-off-by: Allen Conlon <[email protected]>
10cc6b9
to
34f4c62
Compare
@lunny yup, I linked the blog post above, but this user is facing an issue where only a few public registries are on their network allow list. |
Personally I think that it helps adoption to have the image in the major container registries, |
@techknowlogick you will need to change the visibility of the package to public for users to be able to pull the image: |
Thank you very much for merging this in |
…#34148) This PR will cross-publish the release, rc, and nightly images from `docker.io` to `ghcr.io` as docker hub has imposed rate-limiting Signed-off-by: Allen Conlon <[email protected]>
* giteaofficial/main: (27 commits) fix github migration error when using multiple tokens (go-gitea#34144) Add package version api endpoints (go-gitea#34173) Fix incorrect file links (go-gitea#34189) Add cache for common package queries (go-gitea#22491) Allow admins and org owners to change org member public status (go-gitea#28294) Fix span svg layout (go-gitea#34185) fix webhook url (go-gitea#34186) Optimize overflow-menu (go-gitea#34183) Move and rename UpdateRepository (go-gitea#34136) Update milestones.tmpl (go-gitea#34184) [skip ci] Updated translations via Crowdin Refactor Git Attribute & performance optimization (go-gitea#34154) [skip ci] Updated translations via Crowdin fix(go-gitea#33711): cross-publish docker images to ghcr.io (go-gitea#34148) refactor organization menu (go-gitea#33928) feat: Add sorting by exclusive labels (issue priority) (go-gitea#33206) Fix vertical centering of file tree icons and use entryIcon for submodules/symlinks (go-gitea#34137) bugfix check for alternate ssh host certificate location (go-gitea#34146) Cache GPG keys, emails and users when list commits (go-gitea#34086) Set MERMAID_MAX_SOURCE_CHARACTERS to 50000 (go-gitea#34152) ...
This PR will cross-publish the release, rc, and nightly images from
docker.io
toghcr.io
as docker hub has imposed rate-limiting