From 4ea107c65519b028e2637c2e601ef4eef45a1e22 Mon Sep 17 00:00:00 2001 From: hrz <1710360675@qq.com> Date: Mon, 3 Mar 2025 11:02:08 +0800 Subject: [PATCH] =?UTF-8?q?update:=E8=B0=83=E8=AF=95docker=E7=BC=96?= =?UTF-8?q?=E8=AF=91=E5=AE=B9=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/docker-image.yml | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index e2fb74e92..19fbb5596 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -16,17 +16,15 @@ jobs: issues: write steps: + - name: Clean up Docker resources + run: | + docker system prune -af + docker builder prune -af - name: Check out the repo uses: actions/checkout@v4 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - with: - driver-opts: | - # 使用更节省空间的缓存存储模式 - image=moby/buildkit:master - # 限制并行构建的worker数量减少内存压力 - --allow-insecure-entitlement security.insecure - name: Log in to the GitHub Container Registry uses: docker/login-action@v3 @@ -49,15 +47,4 @@ jobs: tags: | ghcr.io/${{ github.repository }}:${{ env.VERSION }} ghcr.io/${{ github.repository }}:latest - platforms: linux/amd64,linux/arm64 - # 使用 registry 缓存避免占用本地磁盘 - cache-from: type=registry,ref=ghcr.io/${{ github.repository }}:buildcache - cache-to: type=registry,ref=ghcr.io/${{ github.repository }}:buildcache,mode=max - # 启用压缩减少传输数据量 - compression: zstd - - - name: Clean up Docker resources - run: | - # 清理构建缓存和临时镜像 - docker system prune -af - docker builder prune -af \ No newline at end of file + platforms: linux/amd64,linux/arm64 \ No newline at end of file