Skip to content

Commit 0db691f

Browse files
committed
Make sure we cache to the builds registry
1 parent f5f13c8 commit 0db691f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

bin/y-build

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ if [[ ! -z "$GIT_COMMIT" ]]; then
6060
fi
6161
fi
6262

63-
[ -z "$BUILDKIT_CACHE" ] && BUILDKIT_CACHE="type=registry,ref=$(echo $IMAGE | sed 's|/|/ystack-buildcache/|' | sed s/:$BUILD_TAG//)"
63+
REGISTRY_CACHE_DEFAULT=$(echo $IMAGE | sed "s|[^/]*|$BUILDS_REGISTRY/ystack-buildcache|" | sed "s/:$BUILD_TAG//")
64+
[ -z "$BUILDKIT_CACHE" ] && BUILDKIT_CACHE="type=registry,ref=$REGISTRY_CACHE_DEFAULT"
6465
[ -z "$IMPORT_CACHE" ] && IMPORT_CACHE="--import-cache=$BUILDKIT_CACHE"
6566
[ -z "$EXPORT_CACHE" ] && EXPORT_CACHE="--export-cache=$BUILDKIT_CACHE,mode=max"
6667
[ "$IMPORT_CACHE" = "false" ] && IMPORT_CACHE=""

0 commit comments

Comments
 (0)