-
Notifications
You must be signed in to change notification settings - Fork 4.6k
fix: check image workflow is failing for external images #9951
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
@cgardens what do you think of this? |
1fc4f13
to
7f12f44
Compare
tools/bin/check_images_exist.sh
Outdated
# manifest API similar to docker so added this check | ||
IMAGE_WITH_VERSION="$1":"$2" | ||
printf "\tIMAGE WITH VERSION: %s\n" "$IMAGE_WITH_VERSION" | ||
docker pull $IMAGE_WITH_VERSION |
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.
is there a url that we can curl instead of actually pulling the image down? the approach for dockerhub is to just to a get request to see that the image exists. does ghcr do something similar? if so we should prefer it.
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.
Looks like it is possible: https://github.community/t/how-to-check-if-a-container-image-exists-on-ghcr/154836/4
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.
Yeah, you would need token and authentication to do that. Since the number of images are less can we do that once they bring up a public API similar to docker
Or is it that we want to add token and use it? What do you folks suggest?
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.
The post mentioned that if it is a public image, a fake token is sufficient. We are dealing with public images, right? If that's the case, I think it's worth trying it.
Otherwise, I think it is fine to pull the image then. Feel free to merge it.
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.
Makes sense. Let me try it with fake token
7f12f44
to
c033c89
Compare
c033c89
to
8b3b23b
Compare
What
Added a new check for github container registry images in check_image_exists workflow