Skip to content

Commit 3106176

Browse files
committed
Update build.sh
1 parent 272ee36 commit 3106176

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

build.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,16 +95,17 @@ elif [ "${MANYLINUX_BUILD_FRONTEND}" == "podman" ]; then
9595
TEST_COMMAND="podman"
9696
podman build "${BUILD_ARGS_COMMON[@]}"
9797
elif [ "${MANYLINUX_BUILD_FRONTEND}" == "docker-buildx" ]; then
98-
USE_LOCAL_CACHE=1
99-
CACHE_STORE=("--cache-to=type=local,dest=$(pwd)/.buildx-cache-staging-${POLICY}_${PLATFORM},mode=max,compression=zstd,compression-level=22,force-compression=true")
10098
if [ "${GITHUB_REPOSITORY:-}_${GITHUB_EVENT_NAME:-}_${GITHUB_REF:-}" == "pypa/manylinux_push_refs/heads/ghcr-cache" ]; then
101-
CACHE_STORE+=("--cache-to=type=registry,ref=ghcr.io/pypa/manylinux-cache:${POLICY}_${PLATFORM}_main,mode=max,compression=zstd,compression-level=22,force-compression=true")
99+
CACHE_STORE="--cache-to=type=registry,ref=ghcr.io/pypa/manylinux-cache:${POLICY}_${PLATFORM}_main,mode=max,compression=zstd,compression-level=22,force-compression=true"
100+
else
101+
USE_LOCAL_CACHE=1
102+
CACHE_STORE="--cache-to=type=local,dest=$(pwd)/.buildx-cache-staging-${POLICY}_${PLATFORM},mode=max,compression=zstd,compression-level=22,force-compression=true"
102103
fi
103104
docker buildx build \
104105
--load \
105106
"--cache-from=type=registry,ref=ghcr.io/pypa/manylinux-cache:${POLICY}_${PLATFORM}_main" \
106107
"--cache-from=type=local,src=$(pwd)/.buildx-cache-${POLICY}_${PLATFORM}" \
107-
"${CACHE_STORE[@]}" \
108+
"${CACHE_STORE}" \
108109
"${BUILD_ARGS_COMMON[@]}"
109110
else
110111
echo "Unsupported build frontend: '${MANYLINUX_BUILD_FRONTEND}'"

0 commit comments

Comments
 (0)