Skip to content

Commit

Permalink
Allow replacing an old runner
Browse files Browse the repository at this point in the history
Co-authored-by: Peter Wall <[email protected]>
  • Loading branch information
joakimk and p-wall committed Dec 2, 2024
1 parent a7a63d1 commit 4911c74
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/controllers/api/cloud_inits_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ def show
"curl https://maintenance.auctionet.dev/running; true",

# The script relies on running sudo but we've disabled root which means it will bring up a prompt to set a password. Running su will run it as the default user that can sudo and also reload the /etc/environment variables.
"su username -c 'cd; curl -s https://raw.githubusercontent.com/actions/runner/main/scripts/create-latest-svc.sh | bash -s #{App.github_actions_runner_scope}'",
# -f replaces any existing runner with the same name so that you can reinstall a runner and have it replace the old one.
"su username -c 'cd; curl -s https://raw.githubusercontent.com/actions/runner/main/scripts/create-latest-svc.sh | bash -s -- -f -s #{App.github_actions_runner_scope}'",

"curl https://maintenance.auctionet.dev/it-ran; true",
"reboot",
Expand Down

0 comments on commit 4911c74

Please sign in to comment.