File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,7 +18,6 @@ locals {
1818 " wget" ,
1919 " docker-compose" ,
2020 ])
21-
2221}
2322
2423resource "random_string" "hetzner_machine" {
@@ -103,6 +102,9 @@ resource "null_resource" "deprovision" {
103102
104103 provisioner "local-exec" {
105104 when = destroy
105+ environment = {
106+ GH_RUNNER_CLI_BIN_PATH = " ${ path . module } /scripts/remote/gh-runner-cli"
107+ }
106108 command = " ${ path . module } /scripts/local/destroy_runner.sh ${ self . triggers . machine_names } ${ self . triggers . github_user } ${ self . triggers . github_user_token } ${ self . triggers . github_repo_name } ${ self . triggers . github_repo_owner } ${ self . triggers . github_runner_type } "
107109 }
108110}
Original file line number Diff line number Diff line change @@ -7,19 +7,20 @@ github_repo_name=$4
77github_owner=$5
88github_runner_type=$6
99
10+ bin_path=" ${GH_RUNNER_CLI_BIN_PATH:- ./ scripts/ remote/ gh-runner-cli} "
1011array=(` echo $machine_names | sed ' s/,/\n/g' ` )
1112for i in " ${array[@]} "
1213do
1314 case " $github_runner_type " in
1415 " repo" )
15- ./scripts/remote/gh-runner-cli repo runner destroy-by-name \
16+ $bin_path repo runner destroy-by-name \
1617 --username=" $github_user " \
1718 --token=" $github_user_token " \
1819 --owner=" $github_owner " \
1920 --name=" $github_repo_name " \
2021 --runner-name " $i " ;;
2122 " org" )
22- ./scripts/remote/gh-runner-cli org runner destroy-by-name \
23+ $bin_path org runner destroy-by-name \
2324 --username " $github_user " \
2425 --token " $github_user_token " \
2526 --name " $github_owner " \
You can’t perform that action at this time.
0 commit comments