mirror of
https://github.com/actions/runner-images.git
synced 2025-12-14 13:17:54 +00:00
Add flag validation diskspace and set false(skip) step by default (#909)
* flag validation diskspace * display Available disk space * update image.CI * add image.CI flag * update env RUN_VALIDATION_FLAG
This commit is contained in:
committed by
GitHub
parent
e25d793c29
commit
521b0c5e28
@@ -8,6 +8,12 @@ availableSpaceMB=$(df / -hm | sed 1d | awk '{ print $4}')
|
||||
minimumFreeSpaceMB=17800
|
||||
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user