Skip to content

Commit a6bf3c5

Browse files
committed
Add additional tags
1 parent 362035b commit a6bf3c5

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

hooks/post_push

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
# A space-separated list of additional tags to place on this image.
6+
additionalTags=(7.1-stretch 71-stretch)
7+
8+
# Parse image name for repo name.
9+
tagStart=$(expr index "$IMAGE_NAME" :)
10+
repoName=${IMAGE_NAME:0:tagStart-1}
11+
12+
# Tag and push image for each additional tag
13+
for tag in ${additionalTags[@]}; do
14+
docker tag $IMAGE_NAME ${repoName}:${tag}
15+
docker push ${repoName}:${tag}
16+
done

0 commit comments

Comments
 (0)