Simpler post build manifest

This commit is contained in:
ViViDboarder 2020-02-10 18:36:33 -08:00
parent 78795c2db6
commit 6d0ce9b6cf
2 changed files with 11 additions and 18 deletions

View File

@ -3,7 +3,17 @@
# Use manifest-tool to create the manifest, given the experimental
# "docker manifest" command isn't available yet on Docker Hub.
TAG_ROOT=${DOCKER_TAG%-*}
TARGET_ARCH=${DOCKER_TAG##*-}
if [[ "$TARGET_ARCH" == "latest" ]]; then
echo "Building a non-arch tag. Skip manifest push"
exit 0
fi
curl -Lo manifest-tool https://github.com/estesp/manifest-tool/releases/download/v0.9.0/manifest-tool-linux-amd64
chmod +x manifest-tool
./manifest-tool push from-spec multi-arch-manifest.yml
./manifest-tool push from-args \
--platforms "linux/$TARGET_ARCH" \
--template "$DOCKER_REPO:${TAG_ROOT}-ARCH" \
--target "$DOCKER_REPO:${TAG_ROOT}"

View File

@ -1,17 +0,0 @@
---
image: vividboarder/docker-restic-cron:latest
manifests:
- image: vividboarder/docker-restic-cron:latest-amd64
platform:
architecture: amd64
os: linux
- image: vividboarder/docker-restic-cron:latest-arm32v7
platform:
architecture: arm
os: linux
variant: v7
- image: vividboarder/docker-restic-cron:latest-arm64v8
platform:
architecture: arm64
os: linux
variant: v8