From abb12d850a3c7d0ca25e5c8e46ae960333c19451 Mon Sep 17 00:00:00 2001
From: Rhys Arkins <rhys@arkins.net>
Date: Fri, 30 Mar 2018 06:42:25 +0200
Subject: [PATCH] fix: tag docker image as latest when on semver

---
 hooks/post_push | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hooks/post_push b/hooks/post_push
index 27bf1baa0a..8f5afa074c 100644
--- a/hooks/post_push
+++ b/hooks/post_push
@@ -20,7 +20,7 @@ major=${BASH_REMATCH[1]}
 minor=${BASH_REMATCH[2]}
 
 # Tag and push image for each additional tag
-for tag in {"$major","${major}.${minor}"}; do
+for tag in {"$major","${major}.${minor}","latest"}; do
   echo "Tagging ${DOCKER_REPO}:${tag}"
   docker tag $IMAGE_NAME ${DOCKER_REPO}:${tag}
   docker push ${DOCKER_REPO}:${tag}
-- 
GitLab