Skip to content

Commit 6061601

Browse files
committed
ci: set /mnt/docker-data as docker storage
Signed-off-by: Jaime Caamaño Ruiz <[email protected]>
1 parent 8025dac commit 6061601

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

.github/actions/diagnostics/action.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,5 @@ runs:
1515
# sort will throw errors on some unreadable mounts and head will exit 2 because the output of the du command
1616
# is too large that it hits the ulimit max. adding the 2>/dev/null and || true are the workarounds so this
1717
# gives the right output and exits cleanly
18-
sudo du -a / --exclude="/proc" --exclude="/sys" --exclude="/dev" | sort -rn 2>/dev/null | head -20 || true
18+
sudo du -ha / --exclude="/proc" --exclude="/sys" --exclude="/dev" | sort -hr 2>/dev/null | head -20 || true
19+
docker system df

.github/workflows/test.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -494,12 +494,26 @@ jobs:
494494
llvm-* microsoft-edge-stable mono-* \
495495
msbuild mysql-server-core-* php-* php7* \
496496
powershell temurin-* zulu-*
497+
sudo docker system prune -af
497498
498499
- name: Setup /mnt/runner directory
499500
run: |
500501
sudo mkdir -pv /mnt/runner
501502
sudo chown runner:runner /mnt/runner
502503
504+
- name: Setup /mnt/docker-data as docker storage
505+
run: |
506+
sudo mkdir -pv /mnt/docker-data
507+
sudo systemctl stop docker.socket docker
508+
[ -s "/etc/docker/daemon.json" ] && {
509+
cat "/etc/docker/daemon.json" | jq '. + {"data-root": "/mnt/docker-data"}' | sudo tee /etc/docker/daemon.$$
510+
} || {
511+
echo '{"data-root": "/mnt/docker-data"}' | sudo tee /etc/docker/daemon.$$
512+
}
513+
sudo mv -f /etc/docker/daemon.$$ /etc/docker/daemon.json
514+
sudo systemctl start docker docker.socket
515+
docker system info
516+
503517
- name: Check out code into the Go module directory
504518
uses: actions/checkout@v4
505519

0 commit comments

Comments
 (0)