Skip to content

Commit 35ac224

Browse files
authored
Merge pull request #1 from moda20/diskspace-github-runner-fix
2 parents efb2c75 + 6758e46 commit 35ac224

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

.github/workflows/ci-cd.yml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,27 @@ name: CI/CD Pipeline
33
on:
44
push:
55
branches:
6-
- master
6+
- diskspace-github-runner-fix
77

88
jobs:
99
build-and-push:
1010
permissions: write-all
1111
runs-on: ubuntu-latest
1212
steps:
13+
- name: Free disk space
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
1327
- name: Checkout code
1428
uses: actions/checkout@v3
1529

@@ -33,3 +47,9 @@ jobs:
3347
ghcr.io/${{ github.repository_owner }}/mes:latest
3448
ghcr.io/${{ github.repository_owner }}/mes:${{ github.sha }}
3549
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)