Check for existing tag in remote repo before building. #764

Merged
telackey merged 14 commits from telackey/remotetag into main 2024-02-24 03:22:51 +00:00
Showing only changes of commit f06b5ec6a2 - Show all commits

View File

@ -33,12 +33,9 @@ def remote_image_exists(local_tag: str, remote_repo_url: str):
docker = DockerClient()
try:
remote_tag = remote_tag_for_image(local_tag, remote_repo_url)
print(f"local tag: {local_tag} ; remote tag: {remote_tag}")
result = docker.manifest.inspect(remote_tag)
print(result)
return True if result else False
except Exception as e: # noqa: E722
print(e)
return False