mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-15 22:36:46 +00:00
[windows] pin pwsh in toolset (#9072)
This commit is contained in:
@@ -13,8 +13,15 @@ try {
|
||||
[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12
|
||||
|
||||
$metadata = Invoke-RestMethod https://raw.githubusercontent.com/PowerShell/PowerShell/master/tools/metadata.json
|
||||
$release = $metadata.LTSReleaseTag[0] -replace '^v'
|
||||
$downloadUrl = "https://github.com/PowerShell/PowerShell/releases/download/v${release}/PowerShell-${release}-win-x64.msi"
|
||||
$pwshMajorMinor = (Get-ToolsetContent).pwsh.version
|
||||
|
||||
$releases = $metadata.LTSReleaseTag -replace '^v'
|
||||
foreach ($release in $releases) {
|
||||
if ($release -like "${pwshMajorMinor}*") {
|
||||
$downloadUrl = "https://github.com/PowerShell/PowerShell/releases/download/v${release}/PowerShell-${release}-win-x64.msi"
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
$installerName = Split-Path $downloadUrl -Leaf
|
||||
$externalHash = Get-ChecksumFromUrl -Type "SHA256" `
|
||||
|
||||
@@ -491,5 +491,8 @@
|
||||
},
|
||||
"openssl": {
|
||||
"version": "1.1.1"
|
||||
},
|
||||
"pwsh": {
|
||||
"version": "7.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -431,5 +431,8 @@
|
||||
},
|
||||
"openssl": {
|
||||
"version": "1.1.1"
|
||||
},
|
||||
"pwsh": {
|
||||
"version": "7.2"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user