Skip to content

Commit ab195c1

Browse files
committed
Added docker hub hooks
1 parent b0baf98 commit ab195c1

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

hooks/post_push

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
3+
[[ "$DOCKER_TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]] || exit 0
4+
5+
MINOR_VERSION="${DOCKER_TAG%.*}"
6+
docker tag $IMAGE_NAME $DOCKER_REPO:$MINOR_VERSION
7+
docker push $DOCKER_REPO:$MINOR_VERSION
8+
9+
docker tag $IMAGE_NAME $DOCKER_REPO:latest
10+
docker push $DOCKER_REPO:latest

0 commit comments

Comments
 (0)