mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-24 02:18:40 +08:00
[Ubuntu] Implement new directories hierarchy (#8627)
This commit is contained in:
committed by
GitHub
parent
d1f2c9a3be
commit
5d40b1e213
20
images/ubuntu/scripts/build/validate-disk-space.sh
Normal file
20
images/ubuntu/scripts/build/validate-disk-space.sh
Normal file
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash -e
|
||||
################################################################################
|
||||
## File: validate-disk-space.sh
|
||||
## Desc: Validate free disk space
|
||||
################################################################################
|
||||
|
||||
availableSpaceMB=$(df / -hm | sed 1d | awk '{ print $4}')
|
||||
minimumFreeSpaceMB=15000
|
||||
|
||||
echo "Available disk space: $availableSpaceMB MB"
|
||||
|
||||
if [ $RUN_VALIDATION != "true" ]; then
|
||||
echo "Skipping validation disk space..."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ $availableSpaceMB -le $minimumFreeSpaceMB ]; then
|
||||
echo "Not enough disk space on the image (minimum available space: $minimumFreeSpaceMB MB)"
|
||||
exit 1
|
||||
fi
|
||||
Reference in New Issue
Block a user