Skip to content

Commit 449de9f

Browse files
committed
Tag docker images with the git commit id
Tag docker images with the git commit id using dockerhub post push hooks Closes #3
1 parent 7431c26 commit 449de9f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

hooks/post_push

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/bash
2+
# Tag and push image built with the git commit id
3+
TAG="${SOURCE_COMMIT:0:7}"
4+
docker tag "$IMAGE_NAME" "$DOCKER_REPO":"$TAG"
5+
docker push "$DOCKER_REPO":"$TAG"

0 commit comments

Comments
 (0)