[docker] push if build is ok

This commit is contained in:
Nico Schottelius 2024-02-17 20:49:31 +09:00
parent 4eb470df16
commit 0d7f10776c

View file

@ -2,6 +2,7 @@
if [ $# -lt 1 ]; then if [ $# -lt 1 ]; then
echo "$0 imageversion [push]" echo "$0 imageversion [push]"
echo "Version could be: $(git describe --always)"
echo "If push is specified, also push to our harbor" echo "If push is specified, also push to our harbor"
exit 1 exit 1
fi fi
@ -11,4 +12,7 @@ version=$1; shift
tag=${tagprefix}:${version} tag=${tagprefix}:${version}
set -ex
docker build -t "${tag}" . docker build -t "${tag}" .
docker push "${tag}"