Only create manifests when images are pushed to registry (#2273)

This commit is contained in:
Ayaz Salikhov
2025-04-01 01:57:34 +01:00
committed by GitHub
parent 0473c8d915
commit b98e55e28d

View File

@@ -57,11 +57,13 @@ def merge_tags(tag: str, push_to_registry: bool) -> None:
except plumbum.ProcessExecutionError:
LOGGER.info(f"Manifest {tag} doesn't exist")
LOGGER.info(f"Creating manifest for tag: {tag}")
docker["manifest", "create", tag][all_platform_tags] & plumbum.FG
LOGGER.info(f"Successfully created manifest for tag: {tag}")
if push_to_registry:
# We need images to have been already pushed to the registry
# before creating the manifest
LOGGER.info(f"Creating manifest for tag: {tag}")
docker["manifest", "create", tag][all_platform_tags] & plumbum.FG
LOGGER.info(f"Successfully created manifest for tag: {tag}")
LOGGER.info(f"Pushing manifest for tag: {tag}")
docker["manifest", "push", tag] & plumbum.FG
LOGGER.info(f"Successfully merged and pushed tag: {tag}")