From b514609f4fa319491d1956205d98012b5fc59d9d Mon Sep 17 00:00:00 2001 From: Mark Lechtermann Date: Fri, 14 Aug 2020 16:47:18 +0200 Subject: Hash as Docker tag supported --- hooks/post_push | 5 +++++ 1 file changed, 5 insertions(+) create mode 100755 hooks/post_push diff --git a/hooks/post_push b/hooks/post_push new file mode 100755 index 0000000..c3a2958 --- /dev/null +++ b/hooks/post_push @@ -0,0 +1,5 @@ +#!/bin/bash + +SHORTHASH="$(git rev-parse --short HEAD)" +docker tag $IMAGE_NAME $DOCKER_REPO:$SHORTHASH +docker push $DOCKER_REPO:$SHORTHASH \ No newline at end of file -- cgit v1.2.3