Skip to content

Commit 4f3838d

Browse files
committed
Add check for much space is left after the build
1 parent 0dd3a7e commit 4f3838d

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

.github/workflows/release.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,17 @@ jobs:
121121
versioning: None
122122
buildName: ${{ needs.variables.outputs.BUILD_NAME }}
123123

124+
- name: Check Disk Space After Build
125+
run: |
126+
echo "Disk space after build:"
127+
df -h
128+
AVAILABLE=$(df / | tail -1 | awk '{print $4}')
129+
AVAILABLE_GB=$(echo $AVAILABLE | sed 's/G//')
130+
echo "Available space: ${AVAILABLE_GB}GB"
131+
if (( $(echo "$AVAILABLE_GB < 1" | bc -l) )); then
132+
echo "::warning::Low disk space! Less than 1GB remaining."
133+
fi
134+
124135
- uses: actions/upload-artifact@v4
125136
with:
126137
name: ${{ needs.variables.outputs.BUILD_NAME }}

0 commit comments

Comments
 (0)