2023-11-10 11:24:16 -05:00
|
|
|
################################################################################
|
|
|
|
|
## 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
|
2023-11-10 11:24:16 -05:00
|
|
|
New-Item -Path "C:\ProgramData\runner" -ItemType Directory
|
2023-11-29 13:02:29 +01:00
|
|
|
Invoke-DownloadWithRetry -Url $downloadUrl -Path "C:\ProgramData\runner\$fileName"
|
2023-11-10 11:24:16 -05:00
|
|
|
|
|
|
|
|
Invoke-PesterTests -TestFile "RunnerCache"
|