mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-30 05:22:06 +08: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
@@ -7,12 +7,9 @@
|
||||
# Source the helpers for use with the script
|
||||
source $HELPER_SCRIPTS/install.sh
|
||||
|
||||
DOWNLOAD_URL=$(get_github_package_download_url "actions/runner" 'test("actions-runner-linux-x64-[0-9]+\\.[0-9]{3}\\.[0-9]+\\.tar\\.gz")')
|
||||
download_url=$(get_github_package_download_url "actions/runner" 'test("actions-runner-linux-x64-[0-9]+\\.[0-9]{3}\\.[0-9]+\\.tar\\.gz")')
|
||||
archive_name="${download_url##*/}"
|
||||
archive_path=$(download_with_retry "$download_url")
|
||||
|
||||
FILE_NAME="${DOWNLOAD_URL##*/}"
|
||||
|
||||
sudo mkdir -p /opt/runner-cache
|
||||
|
||||
download_with_retries "${DOWNLOAD_URL}" "/tmp" "${FILE_NAME}"
|
||||
|
||||
sudo mv /tmp/$FILE_NAME /opt/runner-cache/$FILE_NAME
|
||||
mkdir -p /opt/runner-cache
|
||||
mv "$archive_path" "/opt/runner-cache/$archive_name"
|
||||
|
||||
Reference in New Issue
Block a user