Free runner disk before Docker publish
Some checks failed
Build And Publish Docker Images / plan (push) Has been cancelled
Build And Publish Docker Images / build (push) Has been cancelled

The multi-platform Docker publish job can exhaust the hosted runner disk before BuildKit finishes, causing ENOSPC failures during log writing and cleanup.

Remove unused hosted toolchains and stale local Docker data before QEMU and Buildx setup so release builds have more room without changing Docker image inputs or install scripts.
This commit is contained in:
Alessandro 2026-05-15 19:27:49 +02:00
parent 38bbff3d9a
commit 6664fc7f38

View file

@ -108,6 +108,27 @@ jobs:
exit 1
fi
- name: Free runner disk space
run: |
echo "Disk before cleanup:"
df -h /
docker system df || true
sudo rm -rf \
/opt/az \
/opt/ghc \
/opt/hostedtoolcache/CodeQL \
/usr/local/.ghcup \
/usr/local/lib/android \
/usr/local/share/boost \
/usr/share/dotnet
sudo apt-get clean
docker system prune -af --volumes || true
echo "Disk after cleanup:"
df -h /
docker system df || true
- name: Set up QEMU
uses: docker/setup-qemu-action@v3