diff --git a/.github/scripts/build-docker-alpine.sh b/.github/scripts/build-docker-alpine.sh index 9dc3300322..ca7b9eadd3 100755 --- a/.github/scripts/build-docker-alpine.sh +++ b/.github/scripts/build-docker-alpine.sh @@ -10,6 +10,11 @@ ARCHITECTURE="$5" cp "$APK_FILE" . +if [ "${PUBLISH_DOCKER_IMAGE}" = "true" ]; then + PUSH_OPTION=--push +fi + +# shellcheck disable=SC2086 docker build \ --pull \ --no-cache \ @@ -17,7 +22,7 @@ docker build \ --build-arg "APK_FILE=$APK_FILE" \ --file .github/docker/alpine.dockerfile \ --tag "savonet/liquidsoap-ci-build:${TAG}_alpine_${ARCHITECTURE}" \ - --push \ + ${PUSH_OPTION} \ . if [ "${PUBLISH_DOCKER_IMAGE}" != "true" ]; then diff --git a/.github/scripts/build-docker.sh b/.github/scripts/build-docker.sh index 7288b7fddc..323766ef48 100755 --- a/.github/scripts/build-docker.sh +++ b/.github/scripts/build-docker.sh @@ -13,6 +13,11 @@ cp "$DEB_FILE" "$DEB_DEBUG_FILE" . DOCKERFILE=.github/docker/debian.dockerfile +if [ "${PUBLISH_DOCKER_IMAGE}" = "true" ]; then + PUSH_OPTION=--push +fi + +# shellcheck disable=SC2086 docker build \ --pull \ --no-cache \ @@ -21,7 +26,7 @@ docker build \ --build-arg "DEB_DEBUG_FILE=$DEB_DEBUG_FILE" \ --file "${DOCKERFILE}" \ --tag "savonet/liquidsoap-ci-build:${TAG}_${ARCHITECTURE}" \ - --push \ + ${PUSH_OPTION} \ . if [ "${PUBLISH_DOCKER_IMAGE}" != "true" ]; then