1
0
mirror of https://github.com/imgproxy/imgproxy.git synced 2025-03-17 20:17:48 +02:00

Tag release builds with multiple tags

This commit is contained in:
DarthSim 2019-06-25 17:51:15 +06:00
parent 34526fdd06
commit 05d021bddf

11
docker/hooks/post_push Executable file
View File

@ -0,0 +1,11 @@
#!/bin/bash
re="^v([0-9]+)\.([0-9]+)\.([0-9]+)$"
if [[ $DOCKER_TAG =~ $re ]]; then
docker tag $IMAGE_NAME "$DOCKER_REPO:v${BASH_REMATCH[1]}.${BASH_REMATCH[2]}"
docker push "$DOCKER_REPO:v${BASH_REMATCH[1]}.${BASH_REMATCH[2]}"
docker tag $IMAGE_NAME "$DOCKER_REPO:v${BASH_REMATCH[1]}"
docker push "$DOCKER_REPO:v${BASH_REMATCH[1]}"
fi