Skip to content

Commit 20d2aef

Browse files
committed
fix: add additional cleanup in docker publish workflow, running out of runner space
1 parent fa49907 commit 20d2aef

1 file changed

Lines changed: 19 additions & 2 deletions

File tree

.github/workflows/docker-publish.yml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,28 @@ jobs:
6666
registry: quay.io
6767
username: ${{ secrets.QUAY_IO_ROBOT_USERNAME }}
6868
password: ${{ secrets.QUAY_IO_ROBOT_TOKEN }}
69-
- name: Build image
69+
- name: Free up disk space
7070
run: |
7171
# Clear some space (https://github.com/actions/runner-images/issues/2840)
72-
sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/share/boost
72+
echo "Disk usage before cleanup:"
73+
df -h
74+
75+
# Remove unnecessary pre-installed software
76+
sudo rm -rf /usr/share/dotnet
77+
sudo rm -rf /opt/ghc
78+
sudo rm -rf /usr/local/share/boost
79+
sudo rm -rf /usr/local/lib/android
80+
sudo rm -rf /opt/hostedtoolcache/CodeQL
81+
sudo rm -rf /usr/local/.ghcup
82+
sudo rm -rf /usr/share/swift
83+
84+
# Clean up docker to ensure we start fresh
85+
docker system prune -af --volumes
7386
87+
echo "Disk usage after cleanup:"
88+
df -h
89+
- name: Build image
90+
run: |
7491
DOCKER_BUILDKIT=1 docker buildx build --load -f Dockerfile \
7592
--platform=$DOCKER_PLATFORM \
7693
--build-arg PIP_VERSION=$PIP_VERSION \

0 commit comments

Comments
 (0)