mirror of
https://github.com/actions/runner-images.git
synced 2025-12-10 11:07:02 +00:00
[ubuntu] Update Ruby install (#13058)
This commit is contained in:
committed by
GitHub
parent
3ca6d131cd
commit
dcf9c6937d
@@ -23,9 +23,9 @@ fi
|
|||||||
apt-get install libz-dev openssl libssl-dev
|
apt-get install libz-dev openssl libssl-dev
|
||||||
|
|
||||||
echo "Install Ruby from toolset..."
|
echo "Install Ruby from toolset..."
|
||||||
package_tar_names=$(curl -fsSL "https://api.github.com/repos/ruby/ruby-builder/releases/latest" | jq -r '.assets[].name')
|
|
||||||
toolset_versions=$(get_toolset_value '.toolcache[] | select(.name | contains("Ruby")) | .versions[]')
|
toolset_versions=$(get_toolset_value '.toolcache[] | select(.name | contains("Ruby")) | .versions[]')
|
||||||
platform_version=$(get_toolset_value '.toolcache[] | select(.name | contains("Ruby")) | .platform_version')
|
platform_version=$(get_toolset_value '.toolcache[] | select(.name | contains("Ruby")) | .platform_version')
|
||||||
|
arch=$(get_toolset_value '.toolcache[] | select(.name | contains("Ruby")) | .arch')
|
||||||
ruby_path="$AGENT_TOOLSDIRECTORY/Ruby"
|
ruby_path="$AGENT_TOOLSDIRECTORY/Ruby"
|
||||||
|
|
||||||
echo "Check if Ruby hostedtoolcache folder exist..."
|
echo "Check if Ruby hostedtoolcache folder exist..."
|
||||||
@@ -34,7 +34,8 @@ if [[ ! -d $ruby_path ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
for toolset_version in ${toolset_versions[@]}; do
|
for toolset_version in ${toolset_versions[@]}; do
|
||||||
package_tar_name=$(echo "$package_tar_names" | grep "^ruby-${toolset_version}-ubuntu-${platform_version}.tar.gz$" | sort -V | tail -1)
|
download_url=$(resolve_github_release_asset_url "ruby/ruby-builder" "test(\"ruby-${toolset_version}-ubuntu-${platform_version}-${arch}.tar.gz\")" "${toolset_version}" "false" "true")
|
||||||
|
package_tar_name="${download_url##*/}"
|
||||||
ruby_version=$(echo "$package_tar_name" | cut -d'-' -f 2)
|
ruby_version=$(echo "$package_tar_name" | cut -d'-' -f 2)
|
||||||
ruby_version_path="$ruby_path/$ruby_version"
|
ruby_version_path="$ruby_path/$ruby_version"
|
||||||
|
|
||||||
@@ -42,7 +43,6 @@ for toolset_version in ${toolset_versions[@]}; do
|
|||||||
mkdir -p $ruby_version_path
|
mkdir -p $ruby_version_path
|
||||||
|
|
||||||
echo "Downloading tar archive $package_tar_name"
|
echo "Downloading tar archive $package_tar_name"
|
||||||
download_url="https://github.com/ruby/ruby-builder/releases/download/toolcache/${package_tar_name}"
|
|
||||||
package_archive_path=$(download_with_retry "$download_url")
|
package_archive_path=$(download_with_retry "$download_url")
|
||||||
|
|
||||||
echo "Expand '$package_tar_name' to the '$ruby_version_path' folder"
|
echo "Expand '$package_tar_name' to the '$ruby_version_path' folder"
|
||||||
|
|||||||
Reference in New Issue
Block a user