diff --git a/.forgejo/workflows/ci.yml b/.forgejo/workflows/ci.yml index 8173cf5..25b6eab 100644 --- a/.forgejo/workflows/ci.yml +++ b/.forgejo/workflows/ci.yml @@ -122,7 +122,12 @@ jobs: echo "build_version=$BUILD_VERSION" >> $GITHUB_OUTPUT - name: Free disk space - run: docker system prune -f || true + run: | + # Remove all unused images (including old :SHA tags) and containers. + docker system prune -af || true + # Keep the local BuildKit cache bounded so pip mount cache survives + # but stale intermediate layers don't accumulate indefinitely. + docker builder prune --keep-storage 5g -f || true - name: Set up Docker Buildx uses: docker/setup-buildx-action@v4 @@ -142,5 +147,3 @@ jobs: provenance: false tags: ${{ steps.tags.outputs.value }} build-args: BUILD_VERSION=${{ steps.tags.outputs.build_version }} - cache-from: type=registry,ref=${{ env.IMAGE }}:cache - cache-to: type=registry,ref=${{ env.IMAGE }}:cache,mode=max