File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed
modules/runners/templates Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change 11# # install the runner
22
3+ $s3_location = " ${S3_LOCATION_RUNNER_DISTRIBUTION} "
4+
5+ if ([string ]::IsNullOrEmpty($env: RUNNER_TARBALL_URL ) -and [string ]::IsNullOrEmpty($s3_location )) {
6+ Write-Error " Neither RUNNER_TARBALL_URL or s3_location are set"
7+ exit 1
8+ }
9+
310Write-Host " Creating actions-runner directory for the GH Action installation"
411New-Item - ItemType Directory - Path C:\actions- runner ; Set-Location C:\actions- runner
512
6- Write-Host " Downloading the GH Action runner from s3 bucket $s3_location "
7- aws s3 cp ${S3_LOCATION_RUNNER_DISTRIBUTION} actions- runner.zip
13+ if (-not [string ]::IsNullOrEmpty($env: RUNNER_TARBALL_URL )) {
14+ Write-Host " Downloading the GH Action runner from $env: RUNNER_TARBALL_URL "
15+ Invoke-WebRequest - Uri $env: RUNNER_TARBALL_URL - OutFile actions- runner.zip - UseBasicParsing
16+ } else {
17+ Write-Host " Downloading the GH Action runner from s3 bucket $s3_location "
18+ aws s3 cp $s3_location actions- runner.zip
19+ }
820
921Write-Host " Un-zip action runner"
1022Expand-Archive - Path actions- runner.zip - DestinationPath .
1123
1224Write-Host " Delete zip file"
1325Remove-Item actions- runner.zip
14-
You can’t perform that action at this time.
0 commit comments