@@ -159662,8 +159662,6 @@ const { EC2Client, RunInstancesCommand, TerminateInstancesCommand, waitUntilInst
159662159662const core = __webpack_require__(42186);
159663159663const config = __webpack_require__(34570);
159664159664
159665- const runnerVersion = '2.309.0'
159666-
159667159665// User data scripts are run as the root user
159668159666function buildUserDataScript(githubRegistrationToken, label) {
159669159667 core.info(`Building data script for ${config.input.ec2Os}`)
@@ -159689,8 +159687,10 @@ function buildUserDataScript(githubRegistrationToken, label) {
159689159687 'mkdir C:\\actions-runner; cd C:\\actions-runner',
159690159688 'echo "${config.input.preRunnerScript}" > pre-runner-script.ps1',
159691159689 '& pre-runner-script.ps1',
159692- `Invoke-WebRequest -Uri https://github.com/actions/runner/releases/download/v${runnerVersion}/actions-runner-win-x64-${runnerVersion}.zip -OutFile actions-runner-win-x64-${runnerVersion}.zip`,
159693- `Add-Type -AssemblyName System.IO.Compression.FileSystem ; [System.IO.Compression.ZipFile]::ExtractToDirectory("$PWD/actions-runner-win-x64-${runnerVersion}.zip", "$PWD")`,
159690+ "$runnerVersion = (Invoke-RestMethod -Uri https://api.github.com/repos/actions/runner/releases/latest).tag_name.TrimStart('v')",
159691+ '$runnerZip = "actions-runner-win-x64-$runnerVersion.zip"',
159692+ 'Invoke-WebRequest -Uri "https://github.com/actions/runner/releases/download/v$runnerVersion/$runnerZip" -OutFile $runnerZip',
159693+ 'Add-Type -AssemblyName System.IO.Compression.FileSystem ; [System.IO.Compression.ZipFile]::ExtractToDirectory("$PWD/$runnerZip", "$PWD")',
159694159694 `./config.cmd --url https://github.com/${config.githubContext.owner}/${config.githubContext.repo} --token ${githubRegistrationToken} --labels ${label} --name ${label} --unattended`,
159695159695 './run.cmd',
159696159696 '</powershell>',
0 commit comments