From 8bfdf0f8c0014c07f956a1e283eff36e80039eed Mon Sep 17 00:00:00 2001 From: Lari Hotari Date: Wed, 29 Jan 2025 16:16:21 +0200 Subject: [PATCH] [fix][ci] In GitHub Actions CI configure Docker data-root to /mnt/docker to avoid running out of disk space --- .github/actions/clean-disk/action.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/actions/clean-disk/action.yml b/.github/actions/clean-disk/action.yml index d74c3f25fc64c..e67ce59a08ddb 100644 --- a/.github/actions/clean-disk/action.yml +++ b/.github/actions/clean-disk/action.yml @@ -46,6 +46,15 @@ runs: time df -BM / /mnt echo "::endgroup::" done + if [[ "${{ inputs.mode }}" == "full" ]]; then + echo "::group::Moving /var/lib/docker to /mnt/docker" + sudo systemctl stop docker + echo '{"data-root": "/mnt/docker"}' | sudo tee /etc/docker/daemon.json + sudo mv /var/lib/docker /mnt/docker + sudo systemctl start docker + time df -BM / /mnt + echo "::endgroup::" + fi echo "::group::Cleaning apt state" time sudo bash -c "apt-get clean; apt-get autoclean; apt-get -y --purge autoremove" time df -BM / /mnt