Skip to content

Commit 0b99318

Browse files
authored
fix: free up as much disk as possible in the integration test workflow (#2903)
1 parent 05f0dcf commit 0b99318

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

.github/workflows/tests.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,16 @@ jobs:
108108
- general
109109
- harbor
110110
steps:
111+
- name: cleanup preinstalled software
112+
shell: bash
113+
run: |
114+
echo -e "\n=== Disk usage before cleanup ==="
115+
df -h
116+
117+
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache/CodeQL
118+
119+
echo -e "\n=== Disk usage after cleanup ==="
120+
df -h
111121
- name: checkout compliantkubernetes-apps
112122
uses: actions/checkout@v4
113123
- name: setup docker with buildx
@@ -127,6 +137,18 @@ jobs:
127137
push: false
128138
provenance: false
129139
tags: compliantkubernetes-apps-tests:main
140+
- name: prune docker artefacts
141+
run: |
142+
echo -e "\n=== Disk usage before docker prune ==="
143+
df -h
144+
145+
docker stop $(docker ps -q)
146+
docker container prune -f
147+
docker volume prune -af
148+
docker builder prune -af
149+
150+
echo -e "\n=== Disk usage after docker prune ==="
151+
df -h
130152
- name: create local cache
131153
run: ./scripts/local-cluster.sh cache create
132154
- name: create local resolve

0 commit comments

Comments
 (0)