mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-11 12:07:09 +00:00
[Ubuntu] Rewrite function download_with_retry (#8912)
* [Ubuntu] Rewrite function download_with_retry * Fix loop exit condition
This commit is contained in:
committed by
GitHub
parent
7dba8776df
commit
abb81511d4
@@ -19,8 +19,7 @@ else
|
||||
hash_url="https://github.com/aliyun/aliyun-cli/releases/latest/download/SHASUMS256.txt"
|
||||
fi
|
||||
|
||||
package_name="aliyun-cli-linux-amd64.tgz"
|
||||
download_with_retries "$download_url" "/tmp" "$package_name"
|
||||
archive_path=$(download_with_retry "$download_url")
|
||||
|
||||
# Supply chain security - Alibaba Cloud CLI
|
||||
if isUbuntu20; then
|
||||
@@ -29,9 +28,9 @@ else
|
||||
external_hash=$(get_hash_from_remote_file "$hash_url" "aliyun-cli-linux" "amd64.tgz")
|
||||
fi
|
||||
|
||||
use_checksum_comparison "/tmp/$package_name" "$external_hash"
|
||||
use_checksum_comparison "$archive_path" "$external_hash"
|
||||
|
||||
tar xzf "/tmp/$package_name"
|
||||
tar xzf "$archive_path"
|
||||
mv aliyun /usr/local/bin
|
||||
|
||||
invoke_tests "CLI.Tools" "Aliyun CLI"
|
||||
|
||||
Reference in New Issue
Block a user