elgohr / Publish-Docker-Github-Action

A Github Action used to build and publish Docker images
MIT License
781 stars 209 forks source link

Option to not push if the image tag exists in the registry #130

Closed brandon-piner-aruba closed 3 years ago

brandon-piner-aruba commented 3 years ago

As part of our workflow, we push the docker image to a registry with specific tags. If we use a custom tag and close a PR that does not change the tag, we do not want to override the existing image in the registry because this is bad practice. Setting the check_existing option will abort any image push if one of the tags (excluding latest) exists in the registry

Common use cases:

brandon-piner-aruba commented 3 years ago

Issue link #131

elgohr commented 3 years ago

I'm sad to say, but there's already a way to do that. See https://github.com/elgohr/Publish-Docker-Github-Action/issues/131 Next time please reach out via issue first, so that you don't have the effort. Tests would be good too...