make build image only push if push is specified

This commit is contained in:
Nico Schottelius 2024-02-20 16:25:13 +09:00
parent dee2b1a90c
commit 26f3a1881d

View file

@ -15,4 +15,9 @@ tag=${tagprefix}:${version}
set -ex
docker build -t "${tag}" .
docker push "${tag}"
push=$1; shift
if [ "$push" ]; then
docker push "${tag}"
fi