Tag stable versions with the version number on Docker (#1550)

Fixes #1546
This commit is contained in:
gitgiggety 2021-07-13 01:59:09 +02:00 committed by GitHub
parent 9591faf3d4
commit aecab2d131
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 3 deletions

View File

@ -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 }}"

View File

@ -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/