Skip to content

Commit

Permalink
feat(docker): Add a post push hook to make sure the latest tag gets b…
Browse files Browse the repository at this point in the history
…uilt.
  • Loading branch information
cooperaj authored and jkuri committed Nov 10, 2017
1 parent 18c83af commit 217071d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions hooks/post_push
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env bash

set -e

# Parse image name for repo name
tagStart=$(expr index "$IMAGE_NAME" :)
repoName=${IMAGE_NAME:0:tagStart-1}

docker tag $IMAGE_NAME ${repoName}:${tag}
docker push ${repoName}:latest

0 comments on commit 217071d

Please sign in to comment.