mirror of
https://github.com/actions/runner-images.git
synced 2025-12-24 10:28:00 +08:00
[ubuntu] Rename build scripts (#8866)
* [ubuntu] Rename build scripts * [ubuntu] Change reboot to inline shell * [ubuntu] Move disk space validation to pester tests * [ubuntu] Rename helper and tests files * [ubuntu] Changes to cleanup, post-deployment and r scripts
This commit is contained in:
committed by
GitHub
parent
410fd620be
commit
1bd9214f41
32
images/ubuntu/scripts/build/configure-image-data.sh
Normal file
32
images/ubuntu/scripts/build/configure-image-data.sh
Normal file
@@ -0,0 +1,32 @@
|
||||
#!/bin/bash -e
|
||||
################################################################################
|
||||
## File: configure-image-data.sh
|
||||
## Desc: Create a file with image data and documentation links
|
||||
################################################################################
|
||||
|
||||
imagedata_file=$IMAGEDATA_FILE
|
||||
image_version=$IMAGE_VERSION
|
||||
image_version_major=${image_version/.*/}
|
||||
image_version_minor=$(echo $image_version | cut -d "." -f 2)
|
||||
os_name=$(lsb_release -ds | sed "s/ /\\\n/g")
|
||||
os_version=$(lsb_release -rs)
|
||||
image_label="ubuntu-${os_version}"
|
||||
version_major=${os_version/.*/}
|
||||
version_wo_dot=${os_version/./}
|
||||
github_url="https://github.com/actions/runner-images/blob"
|
||||
|
||||
software_url="${github_url}/ubuntu${version_major}/${image_version_major}.${image_version_minor}/images/ubuntu/Ubuntu${version_wo_dot}-Readme.md"
|
||||
releaseUrl="https://github.com/actions/runner-images/releases/tag/ubuntu${version_major}%2F${image_version_major}.${image_version_minor}"
|
||||
|
||||
cat <<EOF > $imagedata_file
|
||||
[
|
||||
{
|
||||
"group": "Operating System",
|
||||
"detail": "${os_name}"
|
||||
},
|
||||
{
|
||||
"group": "Runner Image",
|
||||
"detail": "Image: ${image_label}\nVersion: ${image_version}\nIncluded Software: ${software_url}\nImage Release: ${releaseUrl}"
|
||||
}
|
||||
]
|
||||
EOF
|
||||
Reference in New Issue
Block a user