Simplify build script
This commit is contained in:
parent
7e78ca7f61
commit
1bc6844c66
7
build.sh
7
build.sh
|
@ -275,7 +275,6 @@ echo "🏭 Building the following targets:" "${DOCKER_TARGETS[@]}"
|
||||||
###
|
###
|
||||||
# Build each target
|
# Build each target
|
||||||
###
|
###
|
||||||
export DOCKER_BUILDKIT=${DOCKER_BUILDKIT-1}
|
|
||||||
for DOCKER_TARGET in "${DOCKER_TARGETS[@]}"; do
|
for DOCKER_TARGET in "${DOCKER_TARGETS[@]}"; do
|
||||||
echo "🏗 Building the target '${DOCKER_TARGET}'"
|
echo "🏗 Building the target '${DOCKER_TARGET}'"
|
||||||
|
|
||||||
|
@ -379,7 +378,9 @@ for DOCKER_TARGET in "${DOCKER_TARGETS[@]}"; do
|
||||||
if [ "${SHOULD_BUILD}" != "true" ]; then
|
if [ "${SHOULD_BUILD}" != "true" ]; then
|
||||||
echo "⏯ Build skipped because sources didn't change"
|
echo "⏯ Build skipped because sources didn't change"
|
||||||
echo "::set-output name=skipped::true"
|
echo "::set-output name=skipped::true"
|
||||||
else
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
###
|
###
|
||||||
# Composing all arguments for `docker build`
|
# Composing all arguments for `docker build`
|
||||||
###
|
###
|
||||||
|
@ -428,7 +429,6 @@ for DOCKER_TARGET in "${DOCKER_TARGETS[@]}"; do
|
||||||
if [ -n "${DOCKER_FROM}" ]; then
|
if [ -n "${DOCKER_FROM}" ]; then
|
||||||
DOCKER_BUILD_ARGS+=(--build-arg "FROM=${DOCKER_FROM}")
|
DOCKER_BUILD_ARGS+=(--build-arg "FROM=${DOCKER_FROM}")
|
||||||
fi
|
fi
|
||||||
# shellcheck disable=SC2031
|
|
||||||
if [ -n "${HTTP_PROXY}" ]; then
|
if [ -n "${HTTP_PROXY}" ]; then
|
||||||
DOCKER_BUILD_ARGS+=(--build-arg "http_proxy=${HTTP_PROXY}")
|
DOCKER_BUILD_ARGS+=(--build-arg "http_proxy=${HTTP_PROXY}")
|
||||||
DOCKER_BUILD_ARGS+=(--build-arg "https_proxy=${HTTPS_PROXY}")
|
DOCKER_BUILD_ARGS+=(--build-arg "https_proxy=${HTTPS_PROXY}")
|
||||||
|
@ -495,5 +495,4 @@ for DOCKER_TARGET in "${DOCKER_TARGETS[@]}"; do
|
||||||
echo "👷 Removing Buildx Builder '${BUILDX_BUILDER_NAME}'"
|
echo "👷 Removing Buildx Builder '${BUILDX_BUILDER_NAME}'"
|
||||||
$DRY docker buildx rm "${BUILDX_BUILDER_NAME}"
|
$DRY docker buildx rm "${BUILDX_BUILDER_NAME}"
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in New Issue