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

[Question] Release docker image to GHCR #1015

Closed
ToshY opened this issue Nov 24, 2024 · 9 comments
Closed

[Question] Release docker image to GHCR #1015

ToshY opened this issue Nov 24, 2024 · 9 comments
Labels
enhancement New feature or request

Comments

@ToshY
Copy link

ToshY commented Nov 24, 2024

Hello 👋

Is it possible to release the docker image to the GitHub Container Registry (GHCR) as well? Reason for asking: Docker Hub rate limits

Thanks in advance.

@ToshY ToshY added the enhancement New feature or request label Nov 24, 2024
@ToshY ToshY changed the title Release docker image to GHCR [Question] Release docker image to GHCR Nov 24, 2024
@mlocati
Copy link
Owner

mlocati commented Nov 28, 2024

Sure it's possible, provided one can tell me how to integrate it in this step.

@ToshY
Copy link
Author

ToshY commented Nov 28, 2024

Sure it's possible, provided one can tell me how to integrate it in this step.

With the current docker/build-push-action and without changing much of your current implementation, I think the easiest way would be like this example: https://docs.docker.com/build/ci/github-actions/push-multi-registries/

In short, an additional login with docker/login-action@v3 and add ghcr.io/mlocati/php-extension-installer to the tags of the docker/build-push-action. (sidenote: you do not have to add additional secrets for this, the GITHUB_TOKEN secret is already available in the workflow)

I can create the PR if you'd like.

@mlocati
Copy link
Owner

mlocati commented Nov 28, 2024

Done, thanks for the link!

@mlocati mlocati closed this as completed Nov 28, 2024
@mlocati
Copy link
Owner

mlocati commented Nov 28, 2024

Now the most important question (I'm kidding, of course😉): do you know if a badge like this is available for pulls from the GitHub Container Registry?

Docker Hub pulls

@ToshY
Copy link
Author

ToshY commented Nov 29, 2024

Now the most important question (I'm kidding, of course😉): do you know if a badge like this is available for pulls from the GitHub Container Registry?

Docker Hub pulls

Sadly doesn't seem an "easy" one that you can use like that one (also see badges/shields#5594). Haven't test it myself, but there's one that includes "downloads", so you might be able to try to use https://github.com/ipitio/backage.

For other (non-downloads) badges, maybe this: https://github.com/eggplants/ghcr-badge

Tags

Latest

Size


Thanks for adding it to GHCR 👍

@mlocati
Copy link
Owner

mlocati commented Nov 29, 2024

@ToshY
Copy link
Author

ToshY commented Nov 29, 2024

I ended up creating https://github.com/mlocati/docker-php-extension-installer/blob/master/.github/workflows/update-ghcr-badge.yml

Hmm... If I understand correctly this will update your README with a new badge every day. While I find the approach interesting, will this not clutter your git history with Update GitHub Registry badge commits?

@mlocati
Copy link
Owner

mlocati commented Nov 29, 2024

That action doesn't update the readme, just this branch: https://github.com/mlocati/docker-php-extension-installer/tree/assets

@ToshY
Copy link
Author

ToshY commented Nov 29, 2024

Oh I misunderstood then, thanks for clarifying. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants