Skip to content

Commit 565b062

Browse files
committed
Adds post_push hook script to sratoolkit
1 parent cbdde8c commit 565b062

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

blast/2.x/BUILD.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Building instructions
1+
# Building instructions
22

33
Run:
44

sratoolkit/3.x/hooks/build

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ if [ -z ${VERSION} ]; then
55
exit 1
66
else
77
echo "Building ${VERSION}"
8-
docker build -f ${DOCKERFILE_PATH} --build-arg VERSION=${VERSION} -t ${IMAGE_NAME} .
8+
docker build -f ${DOCKERFILE_PATH} --build-arg VERSION=${VERSION} -t ${DOCKER_REPO}:${VERSION} .
99
fi

sratoolkit/3.x/hooks/post_push

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
3+
if [ -z ${VERSION} ]; then
4+
echo "VERSION environment variable not set."
5+
exit 1
6+
else
7+
echo "Tagging ${VERSION} as latest"
8+
docker tag ${DOCKER_REPO}:${VERSION} ${DOCKER_REPO}:latest
9+
docker push ${DOCKER_REPO}:latest
10+
fi

0 commit comments

Comments
 (0)