1
0
mirror of https://github.com/imgproxy/imgproxy.git synced 2025-01-23 11:14:48 +02:00
imgproxy/docker/hooks/post_push

12 lines
345 B
Plaintext
Raw Normal View History

2019-06-25 17:51:15 +06:00
#!/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