Attemting again to fix multi-arch hooks

This commit is contained in:
ViViDboarder 2020-02-11 09:15:27 -08:00
parent e9d7ab64f5
commit ce524bd1c2

View File

@ -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"