mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-19 00:06:45 +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
|
[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12
|
||||||
|
|
||||||
$metadata = Invoke-RestMethod https://raw.githubusercontent.com/PowerShell/PowerShell/master/tools/metadata.json
|
$metadata = Invoke-RestMethod https://raw.githubusercontent.com/PowerShell/PowerShell/master/tools/metadata.json
|
||||||
$release = $metadata.LTSReleaseTag[0] -replace '^v'
|
$pwshMajorMinor = (Get-ToolsetContent).pwsh.version
|
||||||
$downloadUrl = "https://github.com/PowerShell/PowerShell/releases/download/v${release}/PowerShell-${release}-win-x64.msi"
|
|
||||||
|
$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
|
$installerName = Split-Path $downloadUrl -Leaf
|
||||||
$externalHash = Get-ChecksumFromUrl -Type "SHA256" `
|
$externalHash = Get-ChecksumFromUrl -Type "SHA256" `
|
||||||
|
|||||||
@@ -491,5 +491,8 @@
|
|||||||
},
|
},
|
||||||
"openssl": {
|
"openssl": {
|
||||||
"version": "1.1.1"
|
"version": "1.1.1"
|
||||||
|
},
|
||||||
|
"pwsh": {
|
||||||
|
"version": "7.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -431,5 +431,8 @@
|
|||||||
},
|
},
|
||||||
"openssl": {
|
"openssl": {
|
||||||
"version": "1.1.1"
|
"version": "1.1.1"
|
||||||
|
},
|
||||||
|
"pwsh": {
|
||||||
|
"version": "7.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user