From 26f3a1881decdcc98c0ae9add4a627af0833a4b7 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 20 Feb 2024 16:25:13 +0900 Subject: [PATCH] make build image only push if push is specified --- build-image.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/build-image.sh b/build-image.sh index 0ac898ed..64a67fd6 100755 --- a/build-image.sh +++ b/build-image.sh @@ -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