Skip to content

Commit d5ddd89

Browse files
Michal Šrámekdcarley
authored andcommitted
update: added ephemeral
Cherry pick of unmerged upstream commit that ensures a runner is deregistered after processing a single job: - machulav@bf49cb5
1 parent fc6e909 commit d5ddd89

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/aws.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ function buildRunCommands(githubRegistrationToken, label) {
1515
`cd "${config.input.runnerHomeDir}"`,
1616
'source /tmp/pre-runner-script.sh',
1717
'export RUNNER_ALLOW_RUNASROOT=1',
18-
`./config.sh --url https://github.com/${config.githubContext.owner}/${config.githubContext.repo} --token ${githubRegistrationToken} --labels ${label}`,
18+
`./config.sh --url https://github.com/${config.githubContext.owner}/${config.githubContext.repo} --token ${githubRegistrationToken} --labels ${label} --ephemeral`,
1919
];
2020
} else {
2121
userData = [
@@ -28,7 +28,7 @@ function buildRunCommands(githubRegistrationToken, label) {
2828
'curl -O -L https://github.com/actions/runner/releases/download/v${RUNNER_VERSION}/actions-runner-linux-${RUNNER_ARCH}-${RUNNER_VERSION}.tar.gz',
2929
'tar xzf ./actions-runner-linux-${RUNNER_ARCH}-${RUNNER_VERSION}.tar.gz',
3030
'export RUNNER_ALLOW_RUNASROOT=1',
31-
`./config.sh --url https://github.com/${config.githubContext.owner}/${config.githubContext.repo} --token ${githubRegistrationToken} --labels ${label}`,
31+
`./config.sh --url https://github.com/${config.githubContext.owner}/${config.githubContext.repo} --token ${githubRegistrationToken} --labels ${label} --ephemeral`,
3232
];
3333
}
3434
if (config.input.runAsUser) {

0 commit comments

Comments
 (0)