mirror of
https://github.com/MoreTore/openpilot.git
synced 2026-08-05 16:26:14 +08:00
CI: disable registry caching (#30474)
* Revert "CI: separate image for docker cache (#30413)"
This reverts commit ce7c4abe37343b78c3a0da66ec784fd71a46e53a.
* Revert "CI: enable buildx for registry cache (#30473)"
This reverts commit 528b1be03ac407184f19b8d4901cdc5a7c96e7eb.
old-commit-hash: 291c04163a
This commit is contained in:
@@ -68,7 +68,8 @@ runs:
|
||||
find . -type f -executable -not -perm 755 -exec chmod 755 {} \;
|
||||
find . -type f -not -executable -not -perm 644 -exec chmod 644 {} \;
|
||||
- id: setup-buildx-action
|
||||
name: setup docker buildx for registry cache
|
||||
if: contains(runner.name, 'buildjet')
|
||||
name: Set up Docker Buildx on buildjet to ensure a consistent cache
|
||||
uses: docker/setup-buildx-action@v2
|
||||
with:
|
||||
driver: docker-container
|
||||
|
||||
@@ -17,15 +17,7 @@ fi
|
||||
|
||||
source $SCRIPT_DIR/docker_common.sh $1 "$TAG_SUFFIX"
|
||||
|
||||
if [ -n "$PUSH_IMAGE" ]; then
|
||||
REG_CACHE="--cache-to type=registry,ref=$REMOTE_CACHE_TAG,mode=max"
|
||||
fi
|
||||
|
||||
DOCKER_BUILDKIT=1 docker buildx build --platform $PLATFORM --load \
|
||||
--cache-from type=registry,ref=$REMOTE_CACHE_TAG \
|
||||
--cache-from type=registry,ref=$REMOTE_TAG \
|
||||
$REG_CACHE \
|
||||
-t $REMOTE_TAG -t $LOCAL_TAG -f $OPENPILOT_DIR/$DOCKER_FILE $OPENPILOT_DIR
|
||||
DOCKER_BUILDKIT=1 docker buildx build --platform $PLATFORM --load --cache-to type=inline --cache-from type=registry,ref=$REMOTE_TAG -t $REMOTE_TAG -t $LOCAL_TAG -f $OPENPILOT_DIR/$DOCKER_FILE $OPENPILOT_DIR
|
||||
|
||||
if [ -n "$PUSH_IMAGE" ]; then
|
||||
docker push $REMOTE_TAG
|
||||
|
||||
@@ -22,4 +22,3 @@ TAG_SUFFIX=$2
|
||||
LOCAL_TAG=$DOCKER_IMAGE$TAG_SUFFIX
|
||||
REMOTE_TAG=$DOCKER_REGISTRY/$LOCAL_TAG
|
||||
REMOTE_SHA_TAG=$DOCKER_REGISTRY/$LOCAL_TAG:$COMMIT_SHA
|
||||
REMOTE_CACHE_TAG=$DOCKER_REGISTRY/$LOCAL_TAG:cache
|
||||
|
||||
Reference in New Issue
Block a user