feat: add --autopush flag to build-image.sh for non-interactive builds

Add optional --autopush parameter to skip the interactive push prompt and automatically push built images to registry. Useful for CI/CD pipelines and automated builds.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-07 12:51:41 +01:00
parent 45d5507bf9
commit 6cf9b312c0

View File

@@ -2,14 +2,19 @@
if [ "$1" == "" ] ; then if [ "$1" == "" ] ; then
printf "\nYou did not specify the Docker image version to build" printf "\nYou did not specify the Docker image version to build"
printf "\n\nSyntax:\n\n build-image.sh 1.0.0\n\n" printf "\n\nSyntax:\n\n build-image.sh 1.0.0 [--autopush]\n\n"
exit 1 exit 1
fi fi
read -p "BUILD: Push new image to registry [y/n]? " -n 1 -r # Check for --autopush flag
echo # (optional) move to a new line if [ "$2" == "--autopush" ]; then
PUSH_IMAGE="y"
PUSH_IMAGE="$REPLY" printf "\nAuto-push enabled. Image will be pushed to registry.\n"
else
read -p "BUILD: Push new image to registry [y/n]? " -n 1 -r
echo # (optional) move to a new line
PUSH_IMAGE="$REPLY"
fi
printf "\nBUILD START ...\n\n" printf "\nBUILD START ...\n\n"