Files
runner-images/images/windows/scripts/build/Install-Runner.ps1
T

17 lines
711 B
PowerShell
Raw Normal View History

################################################################################
## File: Install-Runner.ps1
## Desc: Install Runner for GitHub Actions
## Supply chain security: none
################################################################################
Write-Host "Download latest Runner for GitHub Actions"
2023-12-04 10:50:53 +01:00
$downloadUrl = Resolve-GithubReleaseAssetUrl `
-Repo "actions/runner" `
-Version "latest" `
-UrlMatchPattern "actions-runner-win-x64-*[0-9.].zip"
$fileName = Split-Path $downloadUrl -Leaf
New-Item -Path "C:\ProgramData\runner" -ItemType Directory
Invoke-DownloadWithRetry -Url $downloadUrl -Path "C:\ProgramData\runner\$fileName"
Invoke-PesterTests -TestFile "RunnerCache"