mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2026-01-08 11:07:18 +08: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
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
"image_version": "dev",
|
||||
"image_os": "ubuntu16",
|
||||
"github_feed_token": null,
|
||||
"run_validation_diskspace": "false",
|
||||
"go_default": "1.14",
|
||||
"go_versions": "1.11 1.12 1.13 1.14"
|
||||
},
|
||||
@@ -344,6 +345,9 @@
|
||||
"type": "shell",
|
||||
"scripts":[
|
||||
"{{template_dir}}/scripts/installers/validate-disk-space.sh"
|
||||
],
|
||||
"environment_vars": [
|
||||
"RUN_VALIDATION={{user `run_validation_diskspace`}}"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
"image_version": "dev",
|
||||
"image_os": "ubuntu18",
|
||||
"github_feed_token": null,
|
||||
"run_validation_diskspace": "false",
|
||||
"go_default": "1.14",
|
||||
"go_versions": "1.11 1.12 1.13 1.14"
|
||||
},
|
||||
@@ -348,6 +349,9 @@
|
||||
"type": "shell",
|
||||
"scripts":[
|
||||
"{{template_dir}}/scripts/installers/validate-disk-space.sh"
|
||||
],
|
||||
"environment_vars": [
|
||||
"RUN_VALIDATION={{user `run_validation_diskspace`}}"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user