Skip to content

Commit 6758e46

Browse files
committed
update the Free disk space step
1 parent 6d8fd27 commit 6758e46

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

.github/workflows/ci-cd.yml

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,19 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- name: Free disk space
14-
run: |
15-
sudo swapoff /swapfile \
16-
sudo rm -rf /swapfile /usr/share/dotnet /usr/local/lib/android /opt/ghc
14+
run: |
15+
echo '===== Before ====='
16+
df -h
17+
sudo rm -rf /opt/hostedtoolcache/go
18+
sudo rm -rf /opt/hostedtoolcache/CodeQL
19+
sudo rm -rf /usr/lib/google-cloud-sdk
20+
sudo rm -rf /usr/local/julia*
21+
sudo rm -rf /usr/local/.ghcup
22+
sudo rm -rf /usr/share/swift
23+
sudo rm -rf /usr/share/dotnet
24+
sudo apt-get clean
25+
echo '===== After ====='
26+
df -h
1727
- name: Checkout code
1828
uses: actions/checkout@v3
1929

@@ -37,3 +47,9 @@ jobs:
3747
ghcr.io/${{ github.repository_owner }}/mes:latest
3848
ghcr.io/${{ github.repository_owner }}/mes:${{ github.sha }}
3949
platforms: linux/amd64,linux/arm64
50+
51+
- name: Dump disk usage on failure
52+
if: failure()
53+
run: |
54+
df -h
55+
du -xh / --max-depth=3 2>/dev/null | sort -h | tail -50

0 commit comments

Comments
 (0)