File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed
releases/windows25/x64/images/windows/scripts/build Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change 1+ # ###############################################################################
2+ # # File: Install-Runner.ps1
3+ # # Desc: Install Runner for GitHub Actions
4+ # # Supply chain security: none
5+ # ###############################################################################
6+
7+ Write-Host " Download latest Runner for GitHub Actions"
8+ $downloadUrl = Resolve-GithubReleaseAssetUrl `
9+ - Repo " actions/runner" `
10+ - Version " latest" `
11+ - UrlMatchPattern " actions-runner-win-x64-*[0-9.].zip"
12+ $fileName = Split-Path $downloadUrl - Leaf
13+ New-Item - Path " C:\ProgramData\runner" - ItemType Directory
14+ Invoke-DownloadWithRetry - Url $downloadUrl - Path " C:\ProgramData\runner\$fileName "
15+
16+ # removed: # removed: Invoke-PesterTests
17+ # Patched into Install-Runner.ps1
18+
19+ # Create runner user
20+ $User = " runner"
21+ New-LocalUser - Name $User - NoPassword
22+ Add-LocalGroupMember - Group " Administrators" - Member $User
23+
24+ # Extract runner binary
25+ $runnerZipFile = " C:\ProgramData\runner\$fileName "
26+ $destination = " C:\actions-runner"
27+
28+ New-Item - Path $destination - ItemType Directory - Force
29+ Add-Type - AssemblyName System.IO.Compression.FileSystem
30+ [System.IO.Compression.ZipFile ]::ExtractToDirectory($runnerZipFile , $destination )
31+
32+ # Remove runner binary after extraction
33+ Remove-Item $runnerZipFile - Force
You can’t perform that action at this time.
0 commit comments