1
0
mirror of https://github.com/imgproxy/imgproxy.git synced 2024-12-09 09:56:01 +02:00
imgproxy/docker/hooks/post_push
2019-06-25 17:51:15 +06:00

12 lines
345 B
Bash
Executable File

#!/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