feat: add Docker cleanup step to CI pipeline
Some checks failed
Build and Deploy / build-and-deploy (push) Has been cancelled

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) <noreply@anthropic.com>
This commit is contained in:
zyc 2026-04-04 15:46:52 +08:00
parent 43fe1b8909
commit a8ffd6417a

View File

@ -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