Skip to content

Commit c2013ba

Browse files
committed
Add cleanup step
Signed-off-by: Anish Asthana <[email protected]>
1 parent d950c8b commit c2013ba

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

.github/workflows/image-build-and-push.yaml

+16
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,22 @@ jobs:
2828
release:
2929
runs-on: ubuntu-latest
3030
steps:
31+
- name: Cleanup
32+
run: |
33+
ls -lart
34+
echo "Initial status:"
35+
df -h
36+
echo "Cleaning up resources:"
37+
sudo swapoff -a
38+
sudo rm -f /swapfile
39+
sudo apt clean
40+
sudo rm -rf /usr/share/dotnet
41+
sudo rm -rf /opt/ghc
42+
sudo rm -rf "/usr/local/share/boost"
43+
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
44+
docker rmi $(docker image ls -aq)
45+
echo "Final status:"
46+
df -h
3147
- name: Checkout the repository
3248
uses: actions/checkout@v3
3349
- name: Install Python

0 commit comments

Comments
 (0)