From 076da0ed4e015d7c5bc6c8e1ad0ccef7106cb433 Mon Sep 17 00:00:00 2001 From: Jesaja Everling Date: Wed, 7 Dec 2022 16:39:35 -0300 Subject: [PATCH] Set runner name to --name $(hostname)-$(uuidgen) Avoid failures when other runners are already registered with same name --- dist/index.js | 4 ++-- src/aws.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dist/index.js b/dist/index.js index c213fdae..e1759052 100644 --- a/dist/index.js +++ b/dist/index.js @@ -62811,7 +62811,7 @@ function buildUserDataScript(githubRegistrationToken, label) { '#!/bin/bash', `cd "${config.input.runnerHomeDir}"`, 'export RUNNER_ALLOW_RUNASROOT=1', - `./config.sh --url https://github.com/${config.githubContext.owner}/${config.githubContext.repo} --token ${githubRegistrationToken} --labels ${label}`, + `./config.sh --url https://github.com/${config.githubContext.owner}/${config.githubContext.repo} --token ${githubRegistrationToken} --labels ${label} --name $(hostname)-$(uuidgen)`, './run.sh', ]; } else { @@ -62822,7 +62822,7 @@ function buildUserDataScript(githubRegistrationToken, label) { 'curl -O -L https://github.com/actions/runner/releases/download/v2.299.1/actions-runner-linux-${RUNNER_ARCH}-2.299.1.tar.gz', 'tar xzf ./actions-runner-linux-${RUNNER_ARCH}-2.299.1.tar.gz', 'export RUNNER_ALLOW_RUNASROOT=1', - `./config.sh --url https://github.com/${config.githubContext.owner}/${config.githubContext.repo} --token ${githubRegistrationToken} --labels ${label}`, + `./config.sh --url https://github.com/${config.githubContext.owner}/${config.githubContext.repo} --token ${githubRegistrationToken} --labels ${label} --name $(hostname)-$(uuidgen)`, './run.sh', ]; } diff --git a/src/aws.js b/src/aws.js index c6bd8c9d..27f3241e 100644 --- a/src/aws.js +++ b/src/aws.js @@ -11,7 +11,7 @@ function buildUserDataScript(githubRegistrationToken, label) { '#!/bin/bash', `cd "${config.input.runnerHomeDir}"`, 'export RUNNER_ALLOW_RUNASROOT=1', - `./config.sh --url https://github.com/${config.githubContext.owner}/${config.githubContext.repo} --token ${githubRegistrationToken} --labels ${label}`, + `./config.sh --url https://github.com/${config.githubContext.owner}/${config.githubContext.repo} --token ${githubRegistrationToken} --labels ${label} --name $(hostname)-$(uuidgen)`, './run.sh', ]; } else { @@ -22,7 +22,7 @@ function buildUserDataScript(githubRegistrationToken, label) { 'curl -O -L https://github.com/actions/runner/releases/download/v2.299.1/actions-runner-linux-${RUNNER_ARCH}-2.299.1.tar.gz', 'tar xzf ./actions-runner-linux-${RUNNER_ARCH}-2.299.1.tar.gz', 'export RUNNER_ALLOW_RUNASROOT=1', - `./config.sh --url https://github.com/${config.githubContext.owner}/${config.githubContext.repo} --token ${githubRegistrationToken} --labels ${label}`, + `./config.sh --url https://github.com/${config.githubContext.owner}/${config.githubContext.repo} --token ${githubRegistrationToken} --labels ${label} --name $(hostname)-$(uuidgen)`, './run.sh', ]; }