mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2026-01-07 18:47:18 +08:00
[Windows] Add signature validation (#8390)
This commit is contained in:
@@ -17,8 +17,11 @@ if ($userPath) {
|
||||
$env:Path = $systemPath
|
||||
}
|
||||
|
||||
# Run the installer
|
||||
Invoke-Expression ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))
|
||||
# Verify and run choco installer
|
||||
$signatureThumbprint = "83AC7D88C66CB8680BCE802E0F0F5C179722764B"
|
||||
$InstallScriptPath = Start-DownloadWithRetry -Url 'https://chocolatey.org/install.ps1'
|
||||
Test-FileSignature -FilePath $InstallScriptPath -ExpectedThumbprint $signatureThumbprint
|
||||
Invoke-Expression $InstallScriptPath
|
||||
|
||||
# Turn off confirmation
|
||||
choco feature enable -n allowGlobalConfirmation
|
||||
|
||||
Reference in New Issue
Block a user