docker-kopano/hooks/post_push
admin@vbox1 902a893205 - Reversed tag naming scheme. now full-8.7.80-3.5.2 instead of ~~8.7.80-3.5.2-full~~
- Demo based on `docker-compose.yml` and `Makefile` files
- Check and fix file attributes in the `/var/lib/kopano/attachments` directory
- Updated Tags overview, Usage and Docker compose example section in README.md
2019-02-19 13:52:36 +01:00

20 lines
472 B
Bash

#!/usr/bin/env bash
# hooks/post_push
version=$(assets/kopano-webaddr.sh -VV)
_docker_add_tags() {
local tag="$1"
echo "hooks/post_push called with IMAGE_NAME=${DOCKER_REPO}:${DOCKER_TAG}, so we will use tag=$tag"
docker tag $IMAGE_NAME $DOCKER_REPO:$tag
docker push $DOCKER_REPO:$tag
}
if [[ "$DOCKER_TAG" == "full" ]]; then
_docker_add_tags latest
_docker_add_tags ${version}
_docker_add_tags full-${version}
else
_docker_add_tags ${DOCKER_TAG}-${version}
fi