This repository was archived by the owner on Nov 24, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +13
-6
lines changed Expand file tree Collapse file tree 2 files changed +13
-6
lines changed Original file line number Diff line number Diff line change 5252 String $user,
5353 String $group,
5454 Hash[String, Hash] $instances,
55+ String $github_domain,
56+ String $github_api,
5557) {
5658
5759 $root_dir = " ${github_actions_runner::base_dir_name} -${github_actions_runner::package_ensure} "
Original file line number Diff line number Diff line change 4040 String $instance_name = $title,
4141 Optional[Array[String]] $labels = undef ,
4242 Optional[String] $repo_name = undef ,
43-
43+ String $github_domain = $github_actions_runner::github_domain,
44+ String $github_api = $github_actions_runner::github_api,
4445) {
4546
4647 if $labels {
5152 }
5253
5354 $url = $repo_name ? {
54- undef => " https://github.com /${org_name} " ,
55- default => " https://github.com /${org_name} /${repo_name} " ,
55+ undef => " ${github_domain} /${org_name} " ,
56+ default => " ${github_domain} /${org_name} /${repo_name} " ,
5657 }
5758
58- $token_url = $repo_name ? {
59- undef => " https://api.github.com/repos/${org_name} /actions/runners/registration-token" ,
60- default => " https://api.github.com/repos/${org_name} /${repo_name} /actions/runners/registration-token" ,
59+ if $repo_name {
60+ $token_url = " ${github_api} /repos/${org_name} /${repo_name} /actions/runners/registration-token"
61+ } else {
62+ $token_url = $github_api ? {
63+ ' https://api.github.com' => " ${github_api} /repos/${org_name} /actions/runners/registration-token" ,
64+ default => " ${github_api} /orgs/${org_name} /actions/runners/registration-token" ,
65+ }
6166 }
6267
6368 $archive_name = " ${github_actions_runner::package_name} -${github_actions_runner::package_ensure} .tar.gz"
You can’t perform that action at this time.
0 commit comments