Upload manifests in workflow

This commit is contained in:
Ayaz Salikhov
2022-05-13 00:54:04 +03:00
parent 1170727c19
commit 5ff0ecd8ba
5 changed files with 52 additions and 41 deletions

View File

@@ -3,23 +3,18 @@
# Distributed under the terms of the Modified BSD License.
import argparse
import logging
import platform
import plumbum
from tagging.docker_runner import DockerRunner
from tagging.get_taggers_and_manifests import get_taggers_and_manifests
from tagging.tags_prefix import get_tags_prefix
docker = plumbum.local["docker"]
LOGGER = logging.getLogger(__name__)
def get_tags_prefix() -> str:
machine = platform.machine()
return "" if machine == "x86_64" else f"{machine}-"
def tag_image(short_image_name: str, owner: str, tags_prefix: str) -> None:
"""
Tags <owner>/<short_image_name>:latest with the tags reported by all taggers
@@ -62,6 +57,5 @@ if __name__ == "__main__":
args = arg_parser.parse_args()
tags_prefix = get_tags_prefix()
LOGGER.info(f"Using: {tags_prefix=}")
tag_image(args.short_image_name, args.owner, tags_prefix)