From aecab2d131ead8cdb7ae194f549b33f0b79ccca1 Mon Sep 17 00:00:00 2001 From: gitgiggety <79809426+gitgiggety@users.noreply.github.com> Date: Tue, 13 Jul 2021 01:59:09 +0200 Subject: [PATCH] Tag stable versions with the version number on Docker (#1550) Fixes #1546 --- .github/workflows/build.yml | 2 +- docker/ci/x86_64/docker_push.sh | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c9e919e9a..e963bd17e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -182,4 +182,4 @@ jobs: docker buildx create --name builder --use docker buildx inspect --bootstrap docker buildx ls - bash ./docker/ci/x86_64/docker_push.sh latest + bash ./docker/ci/x86_64/docker_push.sh latest "${{ github.event.release.tag_name }}" diff --git a/docker/ci/x86_64/docker_push.sh b/docker/ci/x86_64/docker_push.sh index 25008c476..8d638e0f7 100644 --- a/docker/ci/x86_64/docker_push.sh +++ b/docker/ci/x86_64/docker_push.sh @@ -1,8 +1,14 @@ #!/bin/bash -DOCKER_TAG=$1 +DOCKER_TAGS="" + +for TAG in "$@" +do + DOCKER_TAGS="$DOCKER_TAGS -t stashapp/stash:$TAG" +done + echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin # must build the image from dist directory -docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 --push --output type=image,name=stashapp/stash:$DOCKER_TAG,push=true -f docker/ci/x86_64/Dockerfile dist/ +docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 --push $DOCKER_TAGS -f docker/ci/x86_64/Dockerfile dist/