From 4c11a9125c444c804c2f766725bed2ce074addc9 Mon Sep 17 00:00:00 2001 From: bunkerity Date: Sat, 24 Oct 2020 16:05:12 +0200 Subject: [PATCH] automatic docker tags with VERSION --- VERSION | 1 + hooks/post_push | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 VERSION diff --git a/VERSION b/VERSION new file mode 100644 index 0000000..9084fa2 --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +1.1.0 diff --git a/hooks/post_push b/hooks/post_push index ae20c81..8841a21 100644 --- a/hooks/post_push +++ b/hooks/post_push @@ -3,8 +3,11 @@ curl -Lo manifest-tool https://github.com/estesp/manifest-tool/releases/download/v1.0.3/manifest-tool-linux-amd64 chmod +x manifest-tool +VERSION=$(cat VERSION | tr -d '\n') if [ "$SOURCE_BRANCH" = "dev" ] ; then - ./manifest-tool push from-spec multi-arch-manifest-dev.yaml + ./manifest-tool push from-args --ignore-missing --platforms linux/amd64,linux/386,linux/arm/v7,linux/arm64/v8 --template bunkerity/bunkerized-nginx:dev-ARCHVARIANT --target bunkerity/bunkerized-nginx:dev-${VERSION} + ./manifest-tool push from-args --ignore-missing --platforms linux/amd64,linux/386,linux/arm/v7,linux/arm64/v8 --template bunkerity/bunkerized-nginx:dev-ARCHVARIANT --target bunkerity/bunkerized-nginx:dev elif [ "$SOURCE_BRANCH" = "master" ] ; then - ./manifest-tool push from-spec multi-arch-manifest-master.yaml + ./manifest-tool push from-args --ignore-missing --platforms linux/amd64,linux/386,linux/arm/v7,linux/arm64/v8 --template bunkerity/bunkerized-nginx:ARCHVARIANT --target bunkerity/bunkerized-nginx:${VERSION} + ./manifest-tool push from-args --ignore-missing --platforms linux/amd64,linux/386,linux/arm/v7,linux/arm64/v8 --template bunkerity/bunkerized-nginx:ARCHVARIANT --target bunkerity/bunkerized-nginx:latest fi