From d0f45d5d38e091585a9167a48a8a9f23a65804df Mon Sep 17 00:00:00 2001 From: Cal Corum Date: Mon, 23 Mar 2026 21:16:00 -0500 Subject: [PATCH] ci: switch buildx cache from registry to local volume Replaces type=registry cache (which causes 400 errors from Docker Hub due to stale buildx builders) with type=local backed by a named Docker volume on the runner. Adds cache rotation step to prevent unbounded growth. Co-Authored-By: Claude Opus 4.6 (1M context) --- .gitea/workflows/build.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index e242b50..367692f 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -20,6 +20,9 @@ on: jobs: build: runs-on: ubuntu-latest + container: + volumes: + - pd-buildx-cache:/opt/buildx-cache steps: - name: Checkout code @@ -58,8 +61,13 @@ jobs: tags: | manticorum67/paper-dynasty-database:${{ steps.version.outputs.version }} manticorum67/paper-dynasty-database:${{ steps.version.outputs.environment }} - cache-from: type=registry,ref=manticorum67/paper-dynasty-database:buildcache - cache-to: type=registry,ref=manticorum67/paper-dynasty-database:buildcache,mode=max + cache-from: type=local,src=/opt/buildx-cache/pd-database + cache-to: type=local,dest=/opt/buildx-cache/pd-database-new,mode=max + + - name: Rotate cache + run: | + rm -rf /opt/buildx-cache/pd-database + mv /opt/buildx-cache/pd-database-new /opt/buildx-cache/pd-database - name: Build Summary run: |