-
Notifications
You must be signed in to change notification settings - Fork 380
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
ci: check image exists with Docker Hub API #1151
ci: check image exists with Docker Hub API #1151
Conversation
|
e455196
to
964eb31
Compare
e714725
to
d8eba72
Compare
The following test workflow log demonstrates that the changed workflow is able to recognize published images on Docker Hub corresponding to the following tags. The workflow correctly halts in this case to prevent an attempt to republish:
Log |
Co-authored-by: Bill Glesias <[email protected]>
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 like this. I think I can archive the docker-image-not-found repo with this update.
Archived that repo as I didn't see it used elsewhere |
That is a good move! The repo was a long way behind and even updating all dependencies would not solve the issue. |
Issue
When used in the CircleCI workflow workflow, the npm module docker-image-not-found outputs an error message "unsupported schema version 2" when attempting to check the existence of a Docker image on Docker Hub, if the image has been published with an
oci
type manifest instead of adocker
type manifest.Change
In the CircleCI workflow workflow, replace the npm module docker-image-not-found using a Docker HUB API call.
For example, the following command returns
0
if Docker Hub reports that the image is not found (HTTP404
), otherwise it returns1
. This works fordocker
andoci
type manifests:Apart from the different parameter passing, the Docker HUB API) call is a drop-in replacement for docker-image-not-found.