From ce524bd1c2ab3b4c4a30d4ebb343df6626973302 Mon Sep 17 00:00:00 2001 From: ViViDboarder Date: Tue, 11 Feb 2020 09:15:27 -0800 Subject: [PATCH] Attemting again to fix multi-arch hooks --- hooks/post_push | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/hooks/post_push b/hooks/post_push index 4a473f4..7168ff6 100755 --- a/hooks/post_push +++ b/hooks/post_push @@ -10,16 +10,16 @@ case "$DOCKER_TAG" in TARGET_ARCH="amd64" ;; *arm32v5) - TARGET_ARCH="arm32v5" + TARGET_ARCH="arm/v5" ;; *arm32v6) - TARGET_ARCH="arm32v6" + TARGET_ARCH="arm/v6" ;; *arm32v7) - TARGET_ARCH="arm32v7" + TARGET_ARCH="arm/v7" ;; *arm64v8) - TARGET_ARCH="arm64v8" + TARGET_ARCH="arm64/v8" ;; *i386) TARGET_ARCH="i386" @@ -41,10 +41,15 @@ if [[ "$TAG_ROOT" == "$TARGET_ARCH" ]]; then TAG_ROOT="latest" fi -curl -Lo manifest-tool https://github.com/estesp/manifest-tool/releases/download/v0.9.0/manifest-tool-linux-amd64 +curl -Lo manifest-tool https://github.com/estesp/manifest-tool/releases/download/v1.0.0/manifest-tool-linux-amd64 chmod +x manifest-tool +# Generate manifest file for this repo and tag root +sed "s#{DOCKER_REPO}#${DOCKER_REPO%:*}#;s#{TAG_ROOT}#${TAG_ROOT}#" multi-arch-manifest-tmpl.yml > multi-arch-manifest.yml +./manifest-tool push from-spec --ignore-missing multi-arch-manifest.yml + +# Fix arch for image tags ./manifest-tool push from-args \ --platforms "linux/$TARGET_ARCH" \ --template "$DOCKER_REPO:$DOCKER_TAG" \ - --target "$DOCKER_REPO:$TAG_ROOT" + --target "$DOCKER_REPO:$DOCKER_TAG"