File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -65282,12 +65282,14 @@ function buildUserDataScript(githubRegistrationToken, label) {
6528265282 } else {
6528365283 return [
6528465284 '#!/bin/bash',
65285+ 'set -euo pipefail',
6528565286 'mkdir actions-runner && cd actions-runner',
6528665287 `echo "${config.input.preRunnerScript}" > pre-runner-script.sh`,
6528765288 'source pre-runner-script.sh',
6528865289 'case $(uname -m) in aarch64) ARCH="arm64" ;; amd64|x86_64) ARCH="x64" ;; esac && export RUNNER_ARCH=${ARCH}',
65289- "VERSION=$(curl -s https://api.github.com/repos/actions/runner/releases/latest | grep tag_name | grep -oP '\\d+(\\.\\d+)*')",
65290- 'curl -O -L https://github.com/actions/runner/releases/download/v${VERSION}/actions-runner-linux-${RUNNER_ARCH}-${VERSION}.tar.gz',
65290+ "VERSION=$(curl --fail -L https://github.com/actions/runner/releases/latest | grep '/actions/runner/tree' | grep -oP 'v[.\\d]+' | tr -d v | head -1)",
65291+ 'echo curl --fail -O -L https://github.com/actions/runner/releases/download/v${VERSION}/actions-runner-linux-${RUNNER_ARCH}-${VERSION}.tar.gz',
65292+ 'curl --fail -O -L https://github.com/actions/runner/releases/download/v${VERSION}/actions-runner-linux-${RUNNER_ARCH}-${VERSION}.tar.gz',
6529165293 'tar xzf ./actions-runner-linux-${RUNNER_ARCH}-${VERSION}.tar.gz',
6529265294 'export RUNNER_ALLOW_RUNASROOT=1',
6529365295 `./config.sh --url https://github.com/${config.githubContext.owner}/${config.githubContext.repo} --token ${githubRegistrationToken} --labels ${label} --name $(hostname)-$(uuidgen)`,
Original file line number Diff line number Diff line change @@ -19,12 +19,14 @@ function buildUserDataScript(githubRegistrationToken, label) {
1919 } else {
2020 return [
2121 '#!/bin/bash' ,
22+ 'set -euo pipefail' ,
2223 'mkdir actions-runner && cd actions-runner' ,
2324 `echo "${ config . input . preRunnerScript } " > pre-runner-script.sh` ,
2425 'source pre-runner-script.sh' ,
2526 'case $(uname -m) in aarch64) ARCH="arm64" ;; amd64|x86_64) ARCH="x64" ;; esac && export RUNNER_ARCH=${ARCH}' ,
26- "VERSION=$(curl -s https://api.github.com/repos/actions/runner/releases/latest | grep tag_name | grep -oP '\\d+(\\.\\d+)*')" ,
27- 'curl -O -L https://github.com/actions/runner/releases/download/v${VERSION}/actions-runner-linux-${RUNNER_ARCH}-${VERSION}.tar.gz' ,
27+ "VERSION=$(curl --fail -L https://github.com/actions/runner/releases/latest | grep '/actions/runner/tree' | grep -oP 'v[.\\d]+' | tr -d v | head -1)" ,
28+ 'echo curl --fail -O -L https://github.com/actions/runner/releases/download/v${VERSION}/actions-runner-linux-${RUNNER_ARCH}-${VERSION}.tar.gz' ,
29+ 'curl --fail -O -L https://github.com/actions/runner/releases/download/v${VERSION}/actions-runner-linux-${RUNNER_ARCH}-${VERSION}.tar.gz' ,
2830 'tar xzf ./actions-runner-linux-${RUNNER_ARCH}-${VERSION}.tar.gz' ,
2931 'export RUNNER_ALLOW_RUNASROOT=1' ,
3032 `./config.sh --url https://github.com/${ config . githubContext . owner } /${ config . githubContext . repo } --token ${ githubRegistrationToken } --labels ${ label } --name $(hostname)-$(uuidgen)` ,
You can’t perform that action at this time.
0 commit comments