Skip to content

Commit 217071d

Browse files
cooperajjkuri
authored andcommitted
feat(docker): Add a post push hook to make sure the latest tag gets built.
1 parent 18c83af commit 217071d

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

hooks/post_push

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/usr/bin/env 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+
docker tag $IMAGE_NAME ${repoName}:${tag}
10+
docker push ${repoName}:latest

0 commit comments

Comments
 (0)