mirror of
https://github.com/actions/runner-images.git
synced 2025-12-15 06:08:07 +00:00
[Windows] Apply code style rules to Windows scripts (#8957)
* Apply code style rules to Windows scripts * Fix typo * Fix configure-toolset script * Fix parameters in Msys2 installation script * Improve log readability * Remove broken exit code validation
This commit is contained in:
committed by
GitHub
parent
76d6f0f574
commit
7fe65a2204
@@ -4,9 +4,11 @@
|
||||
## Maintainer: #actions-runtime and @TingluoHuang
|
||||
################################################################################
|
||||
|
||||
if (-not (Test-Path $env:ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE)) {
|
||||
$actionArchiveCache = "C:\actionarchivecache\"
|
||||
|
||||
if (-not (Test-Path $actionArchiveCache)) {
|
||||
Write-Host "Creating action archive cache folder"
|
||||
New-Item -ItemType Directory -Path $env:ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE | Out-Null
|
||||
New-Item -ItemType Directory -Path $actionArchiveCache | Out-Null
|
||||
}
|
||||
|
||||
$downloadUrl = Resolve-GithubReleaseAssetUrl `
|
||||
@@ -18,6 +20,8 @@ Write-Host "Download Latest action-versions archive from $downloadUrl"
|
||||
$actionVersionsArchivePath = Invoke-DownloadWithRetry $downloadUrl
|
||||
|
||||
Write-Host "Expand action-versions archive"
|
||||
Expand-7ZipArchive -Path $actionVersionsArchivePath -DestinationPath $env:ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE
|
||||
Expand-7ZipArchive -Path $actionVersionsArchivePath -DestinationPath $actionArchiveCache
|
||||
|
||||
[Environment]::SetEnvironmentVariable("ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE", $actionArchiveCache, "Machine")
|
||||
|
||||
Invoke-PesterTests -TestFile "ActionArchiveCache"
|
||||
|
||||
Reference in New Issue
Block a user