diff --git a/.gitea/workflows/images.yml b/.gitea/workflows/images.yml index 56dc408d..21db4a8d 100644 --- a/.gitea/workflows/images.yml +++ b/.gitea/workflows/images.yml @@ -54,3 +54,14 @@ jobs: . echo "pushed $image" done + + # The images live in the registry now; the runner keeps only a bounded build cache. Without this the + # runner's 10Gi Docker volume fills up after a handful of builds (no space left on device mid-build). + - name: Free the runner's disk + if: always() + run: | + set -u + docker image ls --format '{{.Repository}}:{{.Tag}}' | grep "^$IMAGE_PREFIX/" | xargs -r docker image rm -f + docker image prune -f + docker builder prune -f --keep-storage 4GB + docker system df