mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-19 08:21:44 +00:00
Address PR comments
This commit is contained in:
@@ -4,11 +4,9 @@
|
|||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
Write-Host "Get the latest gh version..."
|
Write-Host "Get the latest gh version..."
|
||||||
$GhReleasesJson = Invoke-RestMethod "https://api.github.com/repos/cli/cli/releases/latest"
|
|
||||||
$WindowsMsiAssetNamePattern = "windows_amd64.msi"
|
$Name = "gh_windows_amd64.msi"
|
||||||
$WindowsMsiAsset = $GhReleasesJson.assets | Where-Object { $_.name.EndsWith($WindowsMsiAssetNamePattern) } | Select-Object -First 1
|
$DownloadUrl = (Invoke-RestMethod -Uri "https://api.github.com/repos/cli/cli/releases/latest").assets.browser_download_url -match "windows_amd64.msi"
|
||||||
$Name = $WindowsMsiAsset.name
|
|
||||||
$DownloadUrl = $WindowsMsiAsset.browser_download_url
|
|
||||||
|
|
||||||
Install-Binary -Url $DownloadUrl -Name $Name
|
Install-Binary -Url $DownloadUrl -Name $Name
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user