mirror of
https://github.com/actions/runner-images.git
synced 2025-12-15 06:08:07 +00:00
Add additional agent info (#499)
* add agent additional info * add agent additional info * add agent additional info
This commit is contained in:
committed by
GitHub
parent
531fe345a2
commit
42417eb98f
28
images/linux/scripts/installers/preimagedata.sh
Normal file
28
images/linux/scripts/installers/preimagedata.sh
Normal file
@@ -0,0 +1,28 @@
|
||||
#!/bin/bash
|
||||
|
||||
imagedata_file=$IMAGEDATA_FILE
|
||||
image_version=$IMAGE_VERSION
|
||||
os_name=$(lsb_release -ds | sed "s/ /\\\n/g")
|
||||
image_label="ubuntu-$(lsb_release -rs)"
|
||||
github_url="https://github.com/actions/virtual-environments/blob"
|
||||
|
||||
if [[ "$image_label" =~ "ubuntu-18" ]]; then
|
||||
software_url="${github_url}/ubuntu18/${image_version}/images/linux/Ubuntu1804-README.md"
|
||||
fi
|
||||
|
||||
if [[ "$image_label" =~ "ubuntu-16" ]]; then
|
||||
software_url="${github_url}/ubuntu16/${image_version}/images/linux/Ubuntu1604-README.md"
|
||||
fi
|
||||
|
||||
cat <<EOF > $imagedata_file
|
||||
[
|
||||
{
|
||||
"group": "Operating System",
|
||||
"detail": "${os_name}"
|
||||
},
|
||||
{
|
||||
"group": "Virtual Environment",
|
||||
"detail": "Environment: ${image_label}\nVersion: ${image_version}\nIncluded Software: ${software_url}"
|
||||
}
|
||||
]
|
||||
EOF
|
||||
Reference in New Issue
Block a user