mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-24 10:28:10 +08:00
[Mac OS] Rewrite function download_with_retry (#8914)
* [Mac OS] Rewrite function download_with_retry * Update powershell function DownloadWithRetry
This commit is contained in:
committed by
GitHub
parent
bf202afb1e
commit
5f5ab19246
@@ -13,14 +13,12 @@ Function Install-Asset {
|
||||
[object] $ReleaseAsset
|
||||
)
|
||||
|
||||
$assetFolderPath = Join-Path "/tmp" "$($ReleaseAsset.filename)-temp-dir"
|
||||
New-Item -ItemType Directory -Path $assetFolderPath | Out-Null
|
||||
$assetArchivePath = Join-Path $assetFolderPath $ReleaseAsset.filename
|
||||
|
||||
Write-Host "Download $($ReleaseAsset.filename) archive to the $assetFolderPath folder..."
|
||||
Start-DownloadWithRetry -Url $ReleaseAsset.download_url -DownloadPath $assetFolderPath
|
||||
Write-Host "Download $($ReleaseAsset.filename) archive..."
|
||||
$assetArchivePath = Invoke-DownloadWithRetry $ReleaseAsset.download_url
|
||||
|
||||
Write-Host "Extract $($ReleaseAsset.filename) content..."
|
||||
$assetFolderPath = Join-Path "/tmp" "$($ReleaseAsset.filename)-temp-dir"
|
||||
New-Item -ItemType Directory -Path $assetFolderPath | Out-Null
|
||||
tar -xzf $assetArchivePath -C $assetFolderPath
|
||||
|
||||
Write-Host "Invoke installation script..."
|
||||
|
||||
Reference in New Issue
Block a user