mirror of
https://github.com/actions/runner-images.git
synced 2025-12-15 06:08:07 +00:00
[Windows] Rename image build scripts (#8808)
This commit is contained in:
committed by
GitHub
parent
f78a7baa80
commit
0263bdd53e
19
images/windows/scripts/build/Install-ActionsCache.ps1
Normal file
19
images/windows/scripts/build/Install-ActionsCache.ps1
Normal file
@@ -0,0 +1,19 @@
|
||||
################################################################################
|
||||
## File: Install-ActionsCache.ps1
|
||||
## Desc: Downloads latest release from https://github.com/actions/action-versions
|
||||
## Maintainer: #actions-runtime and @TingluoHuang
|
||||
################################################################################
|
||||
|
||||
if (-not (Test-Path $env:ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE)) {
|
||||
Write-Host "Creating action archive cache folder"
|
||||
New-Item -ItemType Directory -Path $env:ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE | Out-Null
|
||||
}
|
||||
|
||||
$downloadUrl = Get-GitHubPackageDownloadUrl -RepoOwner "actions" -RepoName "action-versions" -Version "latest" -UrlFilter "*/v{Version}/action-versions.zip"
|
||||
Write-Host "Download Latest action-versions archive from $downloadUrl"
|
||||
$actionVersionsArchivePath = Start-DownloadWithRetry -Url $downloadUrl -Name "action-versions.zip"
|
||||
|
||||
Write-Host "Expand action-versions archive"
|
||||
Extract-7Zip -Path $actionVersionsArchivePath -DestinationPath $env:ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE
|
||||
|
||||
Invoke-PesterTests -TestFile "ActionArchiveCache"
|
||||
Reference in New Issue
Block a user