Skip to content

Commit 699e252

Browse files
fix: undo windows change
1 parent ac96589 commit 699e252

File tree

1 file changed

+3
-21
lines changed

1 file changed

+3
-21
lines changed
Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,13 @@
11
## install the runner
22

33
Write-Host "Creating actions-runner directory for the GH Action installation"
4-
New-Item -ItemType Directory -Path C:\actions-runner -Force | Out-Null
5-
Set-Location C:\actions-runner
4+
New-Item -ItemType Directory -Path C:\actions-runner ; Set-Location C:\actions-runner
65

7-
$runnerTarballUrl = $Env:RUNNER_TARBALL_URL
8-
$s3RunnerDistribution = $Env:S3_LOCATION_RUNNER_DISTRIBUTION
9-
10-
if ([string]::IsNullOrWhiteSpace($runnerTarballUrl) -and [string]::IsNullOrWhiteSpace($s3RunnerDistribution)) {
11-
Write-Host "Neither RUNNER_TARBALL_URL nor S3_LOCATION_RUNNER_DISTRIBUTION are set" -ForegroundColor Red
12-
exit 1
13-
}
14-
15-
$fileName = "actions-runner.zip"
16-
17-
if (-not [string]::IsNullOrWhiteSpace($runnerTarballUrl)) {
18-
Write-Host "Downloading the GH Action runner from $runnerTarballUrl to $fileName"
19-
Invoke-WebRequest -Uri $runnerTarballUrl -OutFile $fileName -UseBasicParsing
20-
}
21-
else {
22-
Write-Host "Downloading the GH Action runner from s3 bucket $s3RunnerDistribution"
23-
aws s3 cp $s3RunnerDistribution $fileName | Out-Null
24-
}
6+
Write-Host "Downloading the GH Action runner from s3 bucket $s3_location"
7+
aws s3 cp ${S3_LOCATION_RUNNER_DISTRIBUTION} actions-runner.zip
258

269
Write-Host "Un-zip action runner"
2710
Expand-Archive -Path actions-runner.zip -DestinationPath .
2811

2912
Write-Host "Delete zip file"
3013
Remove-Item actions-runner.zip
31-

0 commit comments

Comments
 (0)