Skip to content

Commit 6e4fb0b

Browse files
committed
Docker: Free up disk space before grabbing the cache when building images.
1 parent f8f0de2 commit 6e4fb0b

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

.github/workflows/build-brev-tutorial-docker-images.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,23 @@ jobs:
3636
- name: Checkout repository
3737
uses: actions/checkout@v4
3838

39+
- name: Free up disk space
40+
run: |
41+
echo "Disk space before cleanup:"
42+
df -h
43+
44+
# Remove unnecessary tools and files to free up space
45+
sudo rm -rf /usr/share/dotnet
46+
sudo rm -rf /usr/local/lib/android
47+
sudo rm -rf /opt/ghc
48+
sudo rm -rf /opt/hostedtoolcache/CodeQL
49+
50+
# Clean up Docker
51+
docker system prune -af --volumes
52+
53+
echo "Disk space after cleanup:"
54+
df -h
55+
3956
- name: Get branch name and short SHA
4057
run: |
4158
echo "GIT_BRANCH_NAME=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV

0 commit comments

Comments
 (0)