Skip to content

Commit

Permalink
[fix][ci] In GitHub Actions CI configure Docker data-root to /mnt/doc…
Browse files Browse the repository at this point in the history
…ker to avoid running out of disk space
  • Loading branch information
lhotari committed Jan 29, 2025
1 parent b6cfecc commit 8bfdf0f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/actions/clean-disk/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8bfdf0f

Please sign in to comment.