mirror of
https://github.com/actions/runner-images.git
synced 2025-12-20 06:35:47 +00:00
[Windows] Implement new directories hierarchy (#8616)
This commit is contained in:
committed by
GitHub
parent
84a7deae24
commit
d1f2c9a3be
14
images/windows/scripts/build/Install-Runner.ps1
Normal file
14
images/windows/scripts/build/Install-Runner.ps1
Normal file
@@ -0,0 +1,14 @@
|
||||
################################################################################
|
||||
## File: Install-Runner.ps1
|
||||
## Desc: Install Runner for GitHub Actions
|
||||
## Supply chain security: none
|
||||
################################################################################
|
||||
|
||||
Write-Host "Download latest Runner for GitHub Actions"
|
||||
$release = Invoke-RestMethod -Uri "https://api.github.com/repos/actions/runner/releases/latest"
|
||||
$version = $release.tag_name.Trim("v")
|
||||
$downloadUrl = ($release.assets.browser_download_url -ilike "*actions-runner-win-x64-${version}.zip*") | Select-Object -First 1
|
||||
New-Item -Path "C:\ProgramData\runner" -ItemType Directory
|
||||
$packagePath = Start-DownloadWithRetry -Url $downloadUrl -DownloadPath "C:\ProgramData\runner"
|
||||
|
||||
Invoke-PesterTests -TestFile "RunnerCache"
|
||||
Reference in New Issue
Block a user