Skip to content

Commit c9e7174

Browse files
authored
feat: random custom runner name
1 parent 07a7778 commit c9e7174

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Vagrantfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Vagrant.configure("2") do |config|
3434
Set-Location actions-runner
3535
Invoke-WebRequest -Uri $GITHUB_RUNNER_URL -OutFile $GITHUB_RUNNER_FILE
3636
Expand-Archive $GITHUB_RUNNER_FILE -DestinationPath .
37-
./config.cmd --name ${GITHUB_RUNNER_NAME}_${RANDOM} --replace --unattended --url $ORGANIZATION_URL --labels $GITHUB_RUNNER_LABELS --pat $PAT
37+
./config.cmd --name ${GITHUB_RUNNER_NAME}_${RANDOM_STR} --replace --unattended --url $ORGANIZATION_URL --labels $GITHUB_RUNNER_LABELS --pat $PAT
3838
./run.cmd
3939
SHELL
4040
end

startup.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
# Password: vagrant
44
set -eou pipefail
55
# Replace environmental variable to Vagrandfile
6+
export RANDOM_STR=$$
67
envsubst < Vagrantfile > exported.txt && mv exported.txt Vagrantfile
78

89
chown root:kvm /dev/kvm

0 commit comments

Comments
 (0)