diff --git a/scripts/build_release_images.sh b/scripts/build_release_images.sh index 3b2ab1947..d87d61f50 100755 --- a/scripts/build_release_images.sh +++ b/scripts/build_release_images.sh @@ -57,6 +57,7 @@ fi echo "=== Building API image ===" if [ "$USE_CACHE" -eq 1 ]; then docker buildx build \ + --build-arg APP_VERSION="$VERSION" \ --cache-from "type=registry,ref=${CACHE_REGISTRY}/api-cache:${CACHE_TAG},ignore-error=true" \ --cache-to "type=registry,ref=${CACHE_REGISTRY}/api-cache:${CACHE_TAG},mode=max" \ -f infra/docker/api.Dockerfile \ @@ -64,12 +65,13 @@ if [ "$USE_CACHE" -eq 1 ]; then --load \ . else - docker build --pull=false -f infra/docker/api.Dockerfile -t "$API_IMAGE" -t "$API_LATEST" . + docker build --pull=false --build-arg APP_VERSION="$VERSION" -f infra/docker/api.Dockerfile -t "$API_IMAGE" -t "$API_LATEST" . fi echo "=== Building Worker image ===" if [ "$USE_CACHE" -eq 1 ]; then docker buildx build \ + --build-arg APP_VERSION="$VERSION" \ --cache-from "type=registry,ref=${CACHE_REGISTRY}/worker-cache:${CACHE_TAG},ignore-error=true" \ --cache-to "type=registry,ref=${CACHE_REGISTRY}/worker-cache:${CACHE_TAG},mode=max" \ -f infra/docker/worker.Dockerfile \ @@ -77,7 +79,7 @@ if [ "$USE_CACHE" -eq 1 ]; then --load \ . else - docker build --pull=false -f infra/docker/worker.Dockerfile -t "$WORKER_IMAGE" -t "$WORKER_LATEST" . + docker build --pull=false --build-arg APP_VERSION="$VERSION" -f infra/docker/worker.Dockerfile -t "$WORKER_IMAGE" -t "$WORKER_LATEST" . fi echo "=== Building Web image (with buildx cache) ==="