From 1815408e730493be0632e5f135ea09e183d67bb7 Mon Sep 17 00:00:00 2001 From: Matt Gaynor <56981878+mattg66@users.noreply.github.com> Date: Mon, 17 Feb 2025 13:13:59 +0000 Subject: [PATCH] Add NO_CACHE to build.sh Add the ability to disable Docker build cache --- build.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/build.sh b/build.sh index a7ac817ad..e4897cdc5 100755 --- a/build.sh +++ b/build.sh @@ -104,6 +104,9 @@ GH_ACTION If defined, special 'echo' statements are enabled that set the CHECK_ONLY Only checks if the build is needed and sets the GH Action output. ${_GREEN}Default:${_CLEAR} undefined + +NO_CACHE Disables Docker Build Cache. + ${_GREEN}Default:${_CLEAR} undefined ${_BOLD}Examples:${_CLEAR} @@ -409,7 +412,9 @@ fi if [ -n "${NO_PROXY}" ]; then DOCKER_BUILD_ARGS+=(--build-arg "no_proxy=${NO_PROXY}") fi - +if [ -n "${NO_CACHE}" ]; then + DOCKER_BUILD_ARGS+=(--no-cache) +fi DOCKER_BUILD_ARGS+=(--platform "${BUILDX_PLATFORM-linux/amd64}") if [ "${2}" == "--push" ]; then # output type=docker does not work with pushing