Skip to content

Commit

Permalink
Adds post_push hook script to sratoolkit
Browse files Browse the repository at this point in the history
  • Loading branch information
hlfernandez committed Dec 27, 2023
1 parent cbdde8c commit 565b062
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion blast/2.x/BUILD.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Building instructions
# Building instructions

Run:

Expand Down
2 changes: 1 addition & 1 deletion sratoolkit/3.x/hooks/build
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ if [ -z ${VERSION} ]; then
exit 1
else
echo "Building ${VERSION}"
docker build -f ${DOCKERFILE_PATH} --build-arg VERSION=${VERSION} -t ${IMAGE_NAME} .
docker build -f ${DOCKERFILE_PATH} --build-arg VERSION=${VERSION} -t ${DOCKER_REPO}:${VERSION} .
fi
10 changes: 10 additions & 0 deletions sratoolkit/3.x/hooks/post_push
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

if [ -z ${VERSION} ]; then
echo "VERSION environment variable not set."
exit 1
else
echo "Tagging ${VERSION} as latest"
docker tag ${DOCKER_REPO}:${VERSION} ${DOCKER_REPO}:latest
docker push ${DOCKER_REPO}:latest
fi

0 comments on commit 565b062

Please sign in to comment.