Skip to content

Commit 4582286

Browse files
committed
Use docker registry API v2
1 parent 9128bdc commit 4582286

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

check_stable.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,12 @@ def rust_stable_version():
2525

2626
def tag_exists(tag):
2727
"""Retrieve our built tags and check we have built a given one"""
28-
url = f'https://registry.hub.docker.com/v1/repositories/{DOCKERHUB_REPO}/tags'
28+
(namespace, repo) = DOCKERHUB_REPO.split("/")
29+
url = f'https://registry.hub.docker.com/v2/namespaces/{namespace}/repositories/{repo}/tags'
2930
req = urllib.urlopen(url)
3031
data = json.loads(req.read())
3132
req.close()
32-
for x in data:
33+
for x in data['results']:
3334
if x['name'] == tag:
3435
return True
3536
return False

0 commit comments

Comments
 (0)