From e3e725cf7b135c1db475cc9d60d1e723db81576c Mon Sep 17 00:00:00 2001 From: arnef Date: Wed, 12 Aug 2026 21:32:49 +0200 Subject: [PATCH] CI: clean up Docker/Podman build artifacts after APK build build-apk.sh always builds with --no-cache, which piles up images, build cache and containers on the runner over time. Add a cleanup step (if: always(), runs even on failure) that prunes everything via 'docker system prune -af --volumes' or the Podman equivalent, so self-hosted runners don't fill up their disk. --- .github/workflows/ci.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 776f0d2..d49740e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,3 +38,15 @@ jobs: with: name: tiptoi-sync-apk path: apk-output/tiptoi-sync.apk + + # Läuft immer, auch wenn der Build fehlschlägt, damit --no-cache-Images/ + # Build-Cache/Container nicht den Runner-Datenträger zumüllen + # (insbesondere relevant für selbst-gehostete/Gitea-Runner). + - name: Clean up Docker/Podman build artifacts + if: always() + run: | + if command -v podman > /dev/null 2>&1; then + podman system prune -af --volumes + elif command -v docker > /dev/null 2>&1; then + docker system prune -af --volumes + fi