fix: remove old tags

This commit is contained in:
Yoshino-s
2023-06-06 11:35:07 +08:00
parent cc83b8034d
commit aaba6407cb

View File

@@ -8,7 +8,8 @@ REPO = 'mattermost/mattermost-enterprise-edition'
dxf = DXF('registry-1.docker.io', REPO) dxf = DXF('registry-1.docker.io', REPO)
dxf.authenticate(actions=["pull"]) dxf.authenticate(actions=["pull"])
tags = dxf.list_aliases() tags = dxf.list_aliases()
tags = (tag for tag in tags if re.match(r"^\d+\.\d+\.\d+$", tag)) tags = [tag for tag in tags if re.match(
r"^\d+\.\d+\.\d+$", tag) and int(tags.split('.')[0]) > 5]
try: try:
local_dxf = DXF(environ['CI_REGISTRY'], environ['CI_PROJECT_PATH']) local_dxf = DXF(environ['CI_REGISTRY'], environ['CI_PROJECT_PATH'])