mirror of
https://github.com/actions/runner-images.git
synced 2025-12-20 06:35:47 +00:00
[Windows] Update functions that get urls and hashes from Github (#8917)
* [Windows] Update function to get hash from github * Remove redundant function and add documentation * Fix aws-sam-cli url
This commit is contained in:
committed by
GitHub
parent
eb0e4ff100
commit
d86c4900fa
@@ -9,12 +9,16 @@ $kotlinVersion = (Get-ToolsetContent).kotlin.version
|
||||
|
||||
$kotlinDownloadUrl = Resolve-GithubReleaseAssetUrl `
|
||||
-Repo "JetBrains/kotlin" `
|
||||
-Version $kotlinVersion `
|
||||
-Version "$kotlinVersion" `
|
||||
-Asset "kotlin-compiler-*.zip"
|
||||
$kotlinArchivePath = Invoke-DownloadWithRetry $kotlinDownloadUrl
|
||||
|
||||
#region Supply chain security
|
||||
$externalHash = Get-HashFromGitHubReleaseBody -RepoOwner "JetBrains" -RepoName "kotlin" -FileName "$kotlinBinaryName-*.zip" -Version $kotlinVersion -WordNumber 2
|
||||
$externalHash = Get-GithubReleaseAssetHash `
|
||||
-Repo "JetBrains/kotlin" `
|
||||
-Version "$kotlinVersion" `
|
||||
-FileName (Split-Path $kotlinDownloadUrl -Leaf) `
|
||||
-HashType "SHA256"
|
||||
Test-FileChecksum $kotlinArchivePath -ExpectedSHA256Sum $externalHash
|
||||
#endregion
|
||||
|
||||
|
||||
Reference in New Issue
Block a user