Skip to content

Commit 2220770

Browse files
authored
[dotnet][rb][java][js][py] remove disk cleanup, add monitoring (#17001)
* [build] remove disk cleanup step from CI * [build] add low disk space check
1 parent c2a394c commit 2220770

File tree

2 files changed

+10
-58
lines changed

2 files changed

+10
-58
lines changed

.github/workflows/bazel.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,6 @@ jobs:
133133
path: ${{ inputs.cache-name }}
134134
key: ${{ inputs.cache-name }}-
135135
restore-keys: ${{ inputs.cache-name }}-
136-
- name: Free space
137-
if: inputs.os != 'windows'
138-
run: ./scripts/github-actions/free-disk-space.sh
139136
- name: Remove driver directories Windows
140137
if: inputs.os == 'windows'
141138
run: |
@@ -269,3 +266,13 @@ jobs:
269266
path: ${{ inputs.artifact-path || 'changes.patch' }}
270267
retention-days: 6
271268
if-no-files-found: ${{ inputs.artifact-path != '' && 'error' || 'warn' }}
269+
- name: Check disk space
270+
if: always()
271+
shell: bash
272+
run: |
273+
avail=$(df -k "$GITHUB_WORKSPACE" | awk 'NR==2 {printf "%.0f", $4/1024/1024}')
274+
echo "Remaining disk space: ${avail}GB"
275+
if [ "$avail" -lt 5 ]; then
276+
echo "::error::Low disk space: ${avail}GB remaining"
277+
exit 1
278+
fi

scripts/github-actions/free-disk-space.sh

Lines changed: 0 additions & 55 deletions
This file was deleted.

0 commit comments

Comments
 (0)