Commit e0a8f3a8 authored by protolambda's avatar protolambda Committed by GitHub

Merge pull request #7870 from ethereum-optimism/docker-publish-fix

ops: handle warm-up output case during docker publish correctly
parents 4c2d1641 9c0960cc
...@@ -229,17 +229,24 @@ jobs: ...@@ -229,17 +229,24 @@ jobs:
# and naming allows us to use the DLC (docker-layer-cache) # and naming allows us to use the DLC (docker-layer-cache)
docker buildx create --driver=docker-container --name=buildx-build --bootstrap --use docker buildx create --driver=docker-container --name=buildx-build --bootstrap --use
DOCKER_OUTPUT_DESTINATION="--load" DOCKER_OUTPUT_DESTINATION=""
# if we are publishing, change the destination
if [ "<<parameters.publish>>" == "true" ]; then if [ "<<parameters.publish>>" == "true" ]; then
DOCKER_OUTPUT_DESTINATION="--push"
echo "Building for platforms $PLATFORMS and then publishing to registry" echo "Building for platforms $PLATFORMS and then publishing to registry"
DOCKER_OUTPUT_DESTINATION="--push"
if [ "<<parameters.save_image_tag>>" != "" ]; then
echo "ERROR: cannot save image to docker when publishing to registry"
exit 1
fi
else else
if [[ $PLATFORMS == *,* ]]; then if [ "<<parameters.save_image_tag>>" == "" ]; then
echo "ERROR: cannot perform multi-arch build while also loading the result into regular docker" echo "Running $PLATFORMS build without destination (cache warm-up)"
DOCKER_OUTPUT_DESTINATION=""
elif [[ $PLATFORMS == *,* ]]; then
echo "ERROR: cannot perform multi-arch (platforms: $PLATFORMS) build while also loading the result into regular docker"
exit 1 exit 1
else else
echo "Running single-platform $PLATFORMS build and loading into docker" echo "Running single-platform $PLATFORMS build and loading into docker"
DOCKER_OUTPUT_DESTINATION="--load"
fi fi
fi fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment