Skip to content

Commit 785e59f

Browse files
jnboothjeverling
andauthored
Set runner name to --name $(hostname)-$(uuidgen) (#3)
Avoid failures when other runners are already registered with same name Co-authored-by: Jesaja Everling <jeverling@gmail.com>
1 parent 30d6ed0 commit 785e59f

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

dist/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62813,7 +62813,7 @@ function buildUserDataScript(githubRegistrationToken, label) {
6281362813
`echo "${config.input.preRunnerScript}" > pre-runner-script.sh`,
6281462814
'source pre-runner-script.sh',
6281562815
'export RUNNER_ALLOW_RUNASROOT=1',
62816-
`./config.sh --url https://github.com/${config.githubContext.owner}/${config.githubContext.repo} --token ${githubRegistrationToken} --labels ${label}`,
62816+
`./config.sh --url https://github.com/${config.githubContext.owner}/${config.githubContext.repo} --token ${githubRegistrationToken} --labels ${label} --name $(hostname)-$(uuidgen) --ephemeral`,
6281762817
'./run.sh',
6281862818
];
6281962819
} else {
@@ -62823,10 +62823,10 @@ function buildUserDataScript(githubRegistrationToken, label) {
6282362823
`echo "${config.input.preRunnerScript}" > pre-runner-script.sh`,
6282462824
'source pre-runner-script.sh',
6282562825
'case $(uname -m) in aarch64) ARCH="arm64" ;; amd64|x86_64) ARCH="x64" ;; esac && export RUNNER_ARCH=${ARCH}',
62826-
'curl -O -L https://github.com/actions/runner/releases/download/v2.299.1/actions-runner-linux-${RUNNER_ARCH}-2.299.1.tar.gz',
62827-
'tar xzf ./actions-runner-linux-${RUNNER_ARCH}-2.299.1.tar.gz',
62826+
'curl -O -L https://github.com/actions/runner/releases/download/2.306.0/actions-runner-linux-${RUNNER_ARCH}-2.306.0.tar.gz',
62827+
'tar xzf ./actions-runner-linux-${RUNNER_ARCH}-2.306.0.tar.gz',
6282862828
'export RUNNER_ALLOW_RUNASROOT=1',
62829-
`./config.sh --url https://github.com/${config.githubContext.owner}/${config.githubContext.repo} --token ${githubRegistrationToken} --labels ${label}`,
62829+
`./config.sh --url https://github.com/${config.githubContext.owner}/${config.githubContext.repo} --token ${githubRegistrationToken} --labels ${label} --name $(hostname)-$(uuidgen) --ephemeral`,
6283062830
'./run.sh',
6283162831
];
6283262832
}

src/aws.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ function buildUserDataScript(githubRegistrationToken, label) {
1313
`echo "${config.input.preRunnerScript}" > pre-runner-script.sh`,
1414
'source pre-runner-script.sh',
1515
'export RUNNER_ALLOW_RUNASROOT=1',
16-
`./config.sh --url https://github.com/${config.githubContext.owner}/${config.githubContext.repo} --token ${githubRegistrationToken} --labels ${label} --ephemeral`,
16+
`./config.sh --url https://github.com/${config.githubContext.owner}/${config.githubContext.repo} --token ${githubRegistrationToken} --labels ${label} --name $(hostname)-$(uuidgen) --ephemeral`,
1717
'./run.sh',
1818
];
1919
} else {
@@ -26,7 +26,7 @@ function buildUserDataScript(githubRegistrationToken, label) {
2626
'curl -O -L https://github.com/actions/runner/releases/download/2.306.0/actions-runner-linux-${RUNNER_ARCH}-2.306.0.tar.gz',
2727
'tar xzf ./actions-runner-linux-${RUNNER_ARCH}-2.306.0.tar.gz',
2828
'export RUNNER_ALLOW_RUNASROOT=1',
29-
`./config.sh --url https://github.com/${config.githubContext.owner}/${config.githubContext.repo} --token ${githubRegistrationToken} --labels ${label} --ephemeral`,
29+
`./config.sh --url https://github.com/${config.githubContext.owner}/${config.githubContext.repo} --token ${githubRegistrationToken} --labels ${label} --name $(hostname)-$(uuidgen) --ephemeral`,
3030
'./run.sh',
3131
];
3232
}

0 commit comments

Comments
 (0)