git.99rst.org
/
roundcube-roundcubemail-docker.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
| inline |
side by side
(parent:
0a92050
)
Add post_build hook to tag latest
author
Thomas Bruederli
<redacted>
Wed, 24 Jul 2019 19:41:55 +0000
(21:41 +0200)
committer
Thomas Bruederli
<redacted>
Wed, 24 Jul 2019 19:41:55 +0000
(21:41 +0200)
hooks/post_build
[new file with mode: 0755]
patch
|
blob
diff --git a/hooks/post_build
b/hooks/post_build
new file mode 100755
(executable)
index 0000000..
23a078e
--- /dev/null
+++ b/
hooks/post_build
@@ -0,0
+1,14
@@
+#!/bin/bash
+
+set -e
+
+tagStart=$(echo $IMAGE_NAME | awk '{print index($1,":")}')
+repoName=${IMAGE_NAME:0:tagStart-1}
+tagName=${IMAGE_NAME:tagStart:99}
+
+if [ "$tagName" = "latest-apache" ]; then
+ echo "Tagging $IMAGE_NAME as :latest"
+
+ docker tag $IMAGE_NAME ${repoName}:latest
+ docker push ${repoName}:latest
+fi
git clone https://git.99rst.org/PROJECT