From a8ffd6417a6ce79aaee187f79279db6a7f8b81f2 Mon Sep 17 00:00:00 2001 From: zyc <1439655764@qq.com> Date: Sat, 4 Apr 2026 15:46:52 +0800 Subject: [PATCH] feat: add Docker cleanup step to CI pipeline Automatically prune unused containers, images and build cache after each CI run to prevent disk space exhaustion on the runner. Co-Authored-By: Claude Opus 4.6 (1M context) --- .gitea/workflows/deploy.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index 4d83365..ecfaa0d 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -226,3 +226,13 @@ jobs: \"run_url\": \"https://gitea.airlabs.art/${{ github.repository }}/actions/runs/${{ github.run_number }}\" } }" || true + + # ===== Cleanup: remove unused Docker resources ===== + - name: Docker Cleanup + if: always() + run: | + docker container prune -f + docker image prune -a -f + docker builder prune -a -f + echo "Disk usage after cleanup:" + df -h / | tail -1