gpr-docker-publish icon indicating copy to clipboard operation
gpr-docker-publish copied to clipboard

Use Git Tags as additional Docker Image Tags

Open kellervater opened this issue 5 years ago • 6 comments

I added the functionality to implicitly use Git Tags as additional Docker Tags. Means: If you commit a new Git Tag, an appropriate additional Docker Tag with the same name is going to be created as well. I fixed a few typos and introduced a Github Workflow to get this action tested.

I already did an integration test by using this functionality here: https://github.com/saubermacherag/docker-ansible-alpine

The big advantage I see is that you can comfortably draft a realease on Github which implicitly creates a GIT tag which will also become the docker tag.

Due to issue https://github.community/t5/GitHub-Actions/docker-pull-from-public-GitHub-Package-Registry-fail-with-quot/m-p/32782 which basically says, that Github Actions cannot rely on Docker Images on Github's Package Registry without authentication

I also added the DOCKERHUB_REPOSITORY option which allow to push the image to dockerhub instead of GPR.

kellervater avatar Nov 25 '19 09:11 kellervater

btw. this was originally a fork of a fork and I somehow wasn't able to sync this PR with your repo. And I'm not able to resolve the conflicts here on Github.

kellervater avatar Nov 25 '19 09:11 kellervater

resolved conflicts. Tests for dockerhub integratoin pending...

kellervater avatar Nov 25 '19 11:11 kellervater

Dockerhub Pushes work now.

kellervater avatar Nov 25 '19 11:11 kellervater

I'm not sure about expanding the scope of this action to include pushing to other registries? There are other Actions for that. The purpose of this Action was to make it easy to push to GPR since there are some nuances for that you don't need to worry about this Action.

What do you think?

hamelsmu avatar Dec 05 '19 19:12 hamelsmu

Thanks for your review :-D

My point of including Dockerhub is this issue here: https://github.community/t5/GitHub-Actions/docker-pull-from-public-GitHub-Package-Registry-fail-with-quot/td-p/32782

The tl;dr version is: At the moment it is not possible to pull from public github package registries without providing credentials, which makes this whole Package Registry thing almost unusable. Therefore I added the Dockerhub Repo option.

But I do understand your point and if this option is a nogo and we just shall wait for the fix from github side, please just close this PR ;-)

kellervater avatar Dec 09 '19 12:12 kellervater

I'd like to see this PR go in, too!

eyal0 avatar Dec 19 '19 04:12 eyal0