Skip to content

Commit c933942

Browse files
committed
Added a disk cleanup step
1 parent 0410ae1 commit c933942

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

.github/workflows/build.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,26 @@ jobs:
8080
images: |
8181
ghcr.io/${{ github.repository }}
8282
83+
- name: Free up disk space
84+
run: |
85+
echo "Available space before cleanup:"
86+
df -h
87+
88+
# Remove unnecessary software
89+
sudo rm -rf /usr/share/dotnet
90+
sudo rm -rf /usr/local/lib/android
91+
sudo rm -rf /opt/ghc
92+
sudo rm -rf /opt/hostedtoolcache/CodeQL
93+
94+
# Clean apt cache
95+
sudo apt-get clean
96+
97+
# Clean Docker
98+
docker system prune -af --volumes
99+
100+
echo "Available space after cleanup:"
101+
df -h
102+
83103
- name: Build and push
84104
uses: docker/build-push-action@v6
85105
with:

.github/workflows/lambda_build.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,26 @@ jobs:
105105
- name: Set up Docker Buildx
106106
uses: docker/setup-buildx-action@v3
107107

108+
- name: Free up disk space
109+
run: |
110+
echo "Available space before cleanup:"
111+
df -h
112+
113+
# Remove unnecessary software
114+
sudo rm -rf /usr/share/dotnet
115+
sudo rm -rf /usr/local/lib/android
116+
sudo rm -rf /opt/ghc
117+
sudo rm -rf /opt/hostedtoolcache/CodeQL
118+
119+
# Clean apt cache
120+
sudo apt-get clean
121+
122+
# Clean Docker
123+
docker system prune -af --volumes
124+
125+
echo "Available space after cleanup:"
126+
df -h
127+
108128
- name: Build and push
109129
uses: docker/build-push-action@v6
110130
with:

0 commit comments

Comments
 (0)