From 9dd80681c75d2a4c35b4403c00a552537077e67d Mon Sep 17 00:00:00 2001 From: thelamer Date: Sat, 13 Apr 2019 23:35:55 -0700 Subject: [PATCH] additional release logic to try to push manifested releases on publish --- .circleci/config.yml | 36 +++++++++++++++++++++++++++++++++++- goreleaser.yml | 4 ++-- 2 files changed, 37 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index bead463..e95899d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -113,4 +113,38 @@ jobs: echo "$DOCKER_PASS" | docker login -u $DOCKER_USER --password-stdin - run: name: Execute goreleaser - command: CGO_ENABLED=${CGO_ENABLED:-0} ../goreleaser --debug \ No newline at end of file + command: CGO_ENABLED=${CGO_ENABLED:-0} ../goreleaser --debug + - run: + name: Docker Manifest + command: | + mkdir -p ~/.docker/ && \ + echo '{"experimental": "enabled"}' > ~/.docker/config.json && \ + docker manifest create containrrr/watchtower:${CIRCLE_TAG} containrrr/watchtower:amd64-${CIRCLE_TAG} containrrr/watchtower:i386-${CIRCLE_TAG} containrrr/watchtower:armhf-${CIRCLE_TAG} containrrr/watchtower:arm64v8-${CIRCLE_TAG} && \ + docker manifest annotate containrrr/watchtower:${CIRCLE_TAG} containrrr/watchtower:i386-${CIRCLE_TAG} --os linux --arch 386 && \ + docker manifest annotate containrrr/watchtower:${CIRCLE_TAG} containrrr/watchtower:armhf-${CIRCLE_TAG} --os linux --arch arm && \ + docker manifest annotate containrrr/watchtower:${CIRCLE_TAG} containrrr/watchtower:arm64v8-${CIRCLE_TAG} --os linux --arch arm64 --variant v8 && \ + docker tag containrrr/watchtower:amd64-${CIRCLE_TAG} containrrr/watchtower:amd64-latest && \ + docker tag containrrr/watchtower:i386-${CIRCLE_TAG} containrrr/watchtower:i386-latest && \ + docker tag containrrr/watchtower:armhf-${CIRCLE_TAG} containrrr/watchtower:armhf-latest && \ + docker tag containrrr/watchtower:arm64v8-${CIRCLE_TAG} containrrr/watchtower:arm64v8-latest && \ + docker push containrrr/watchtower:amd64-latest && \ + docker push containrrr/watchtower:i386-latest && \ + docker push containrrr/watchtower:armhf-latest && \ + docker push containrrr/watchtower:arm64v8-latest && \ + docker manifest create containrrr/watchtower:latest containrrr/watchtower:amd64-latest containrrr/watchtower:i386-latest containrrr/watchtower:armhf-latest containrrr/watchtower:arm64v8-latest && \ + docker manifest annotate containrrr/watchtower:latest containrrr/watchtower:i386-latest --os linux --arch 386 && \ + docker manifest annotate containrrr/watchtower:latest containrrr/watchtower:armhf-latest --os linux --arch arm && \ + docker manifest annotate containrrr/watchtower:latest containrrr/watchtower:arm64v8-latest --os linux --arch arm64 --variant v8 && \ + docker manifest push containrrr/watchtower:${CIRCLE_TAG} && \ + docker manifest push containrrr/watchtower:latest + - run: + name: Sync Readme to Dockerhub + command: | + docker pull lsiodev/readme-sync && \ + docker run --rm=true \ + -e DOCKERHUB_USERNAME=$DOCKER_USER \ + -e DOCKERHUB_PASSWORD="$DOCKER_PASS" \ + -e GIT_REPOSITORY=containrrr/watchtower \ + -e DOCKER_REPOSITORY=containrrr/watchtower \ + -e GIT_BRANCH=master \ + lsiodev/readme-sync bash -c 'node sync' diff --git a/goreleaser.yml b/goreleaser.yml index 2db606c..a14933c 100644 --- a/goreleaser.yml +++ b/goreleaser.yml @@ -31,7 +31,7 @@ dockers: goarm: '' dockerfile: Dockerfile image_templates: - - containrrr/watchtower:{{ .Version }} + - containrrr/watchtower:amd64-{{ .Version }} binaries: - watchtower - @@ -60,4 +60,4 @@ dockers: image_templates: - containrrr/watchtower:arm64v8-{{ .Version }} binaries: - - watchtower \ No newline at end of file + - watchtower