Skip to content
This repository has been archived by the owner on Jan 11, 2022. It is now read-only.

Commit

Permalink
Add manifests on tags too
Browse files Browse the repository at this point in the history
  • Loading branch information
anatolinicolae committed Jul 9, 2020
1 parent ab711a4 commit 2ec01f9
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 3 deletions.
15 changes: 13 additions & 2 deletions hooks/post_push
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,18 @@
# Use manifest-tool to create the manifest, given the experimental
# "docker manifest" command isn't available yet on Docker Hub.

curl -Lo manifest-tool https://github.com/estesp/manifest-tool/releases/download/v0.9.0/manifest-tool-linux-amd64
MANIFEST_TOOL_VERSION=$(curl -s https://api.github.com/repos/estesp/manifest-tool/releases/latest | grep 'tag_name' | cut -d\" -f4)
curl -Lo manifest-tool "https://github.com/estesp/manifest-tool/releases/download/${MANIFEST_TOOL_VERSION}/manifest-tool-$(uname -s)-$(uname -m)"
chmod +x manifest-tool

./manifest-tool push from-spec multi-arch-manifest.yaml
# Push latest manifest
if [[ $DOCKER_TAG = "latest" ]]; then
./manifest-tool push from-spec multi-arch-manifest.latest.yml
fi

# Push tag manifest
TAG_REGEX="^[0-9.]+$"
if [[ $DOCKER_TAG =~ $TAG_REGEX ]]; then
sed -i "s/DOCKER_TAG/$DOCKER_TAG/" multi-arch-manifest.tag.yml
./manifest-tool push from-spec multi-arch-manifest.tag.yml
fi
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
image: thundersquared/tikvidbot:latest
manifests:
- image: thundersquared/tikvidbot:amd64
Platform:
platform:
architecture: amd64
os: linux
- image: thundersquared/tikvidbot:arm32v7
Expand Down
16 changes: 16 additions & 0 deletions multi-arch-manifest.tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
image: thundersquared/tikvidbot:DOCKER_TAG
manifests:
- image: thundersquared/tikvidbot:DOCKER_TAG-amd64
platform:
architecture: amd64
os: linux
- image: thundersquared/tikvidbot:DOCKER_TAG-arm32v7
platform:
architecture: arm
os: linux
variant: v7
- image: thundersquared/tikvidbot:DOCKER_TAG-arm64v8
platform:
architecture: arm64
os: linux
variant: v8

0 comments on commit 2ec01f9

Please sign in to comment.