Skip to content

Commit a44863d

Browse files
authored
GHA: Housekeep GHA Runner Node (#4310)
1 parent c882a22 commit a44863d

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

.github/workflows/build.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,27 @@ jobs:
8383
steps:
8484
- uses: actions/checkout@v4
8585

86+
# --- Disk usage before cleanup ---
87+
- name: Check disk usage before cleanup
88+
if: runner.os == 'Linux'
89+
run: df -h
90+
91+
# --- Cleanup step ---
92+
- name: node-cleanup
93+
if: runner.os == 'Linux'
94+
run: |
95+
sudo rm -rf /usr/share/dotnet \
96+
/usr/local/lib/android \
97+
/opt/ghc \
98+
/opt/hostedtoolcache/CodeQL
99+
sudo docker image prune --all --force
100+
sudo docker builder prune -a --force
101+
102+
# --- Disk usage after cleanup ---
103+
- name: Check disk usage after cleanup
104+
if: runner.os == 'Linux'
105+
run: df -h
106+
86107
- name: Build Linux within container image "${{ matrix.image }}"
87108
run: |
88109
docker run --rm -w /home/jenkins -v "$PWD":"/home/jenkins" \

0 commit comments

Comments
 (0)