Skip to content
This repository was archived by the owner on Feb 15, 2024. It is now read-only.

Commit 4b09801

Browse files
committed
Add Docker Hub hooks
1 parent e9256c1 commit 4b09801

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

hooks/post_checkout

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/bash
2+
3+
# recursively pull all submodules after checkout
4+
git submodule update --init --recursive --depth 1

hooks/post_push

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/bash
2+
3+
# push to another tag named after the commit id
4+
commit_hash=$(echo $SOURCE_COMMIT | cut -c 1-7)
5+
docker tag $IMAGE_NAME $DOCKER_REPO:$commit_hash
6+
docker push $DOCKER_REPO:$commit_hash

0 commit comments

Comments
 (0)