Skip to content

Commit c4ae16b

Browse files
committed
Added post_push hook
1 parent 36fb56c commit c4ae16b

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

hooks/post_push

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
# Parse image name for repo name
6+
tagStart=$(expr index "$IMAGE_NAME" :)
7+
repoName=${IMAGE_NAME:0:tagStart-1}
8+
9+
# Tag and push image for latest
10+
docker tag $IMAGE_NAME ${repoName}:latest
11+
docker push ${repoName}:latest

0 commit comments

Comments
 (0)