This repository was archived by the owner on Nov 24, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +15
-7
lines changed Expand file tree Collapse file tree 3 files changed +15
-7
lines changed Original file line number Diff line number Diff line change @@ -9,4 +9,5 @@ github_actions_runner::personal_access_token: 'PAT'
99github_actions_runner::user : ' root'
1010github_actions_runner::group : ' root'
1111github_actions_runner::instances : {}
12-
12+ github_actions_runner::github_domain : " https://github.com"
13+ github_actions_runner::github_api : " https://api.github.com"
Original file line number Diff line number Diff line change 5858 String $user,
5959 String $group,
6060 Hash[String, Hash] $instances,
61+ String $github_domain,
62+ String $github_api,
6163 Optional[String] $http_proxy = undef ,
6264 Optional[String] $https_proxy = undef ,
6365 Optional[String] $no_proxy = undef ,
Original file line number Diff line number Diff line change 5252 Optional[String] $no_proxy = $github_actions_runner::no_proxy,
5353 Optional[Array[String]] $labels = undef ,
5454 Optional[String] $repo_name = undef ,
55-
55+ String $github_domain = $github_actions_runner::github_domain,
56+ String $github_api = $github_actions_runner::github_api,
5657) {
5758
5859 if $labels {
6364 }
6465
6566 $url = $repo_name ? {
66- undef => " https://github.com /${org_name} " ,
67- default => " https://github.com /${org_name} /${repo_name} " ,
67+ undef => " ${github_domain} /${org_name} " ,
68+ default => " ${github_domain} /${org_name} /${repo_name} " ,
6869 }
6970
70- $token_url = $repo_name ? {
71- undef => " https://api.github.com/repos/${org_name} /actions/runners/registration-token" ,
72- default => " https://api.github.com/repos/${org_name} /${repo_name} /actions/runners/registration-token" ,
71+ if $repo_name {
72+ $token_url = " ${github_api} /repos/${org_name} /${repo_name} /actions/runners/registration-token"
73+ } else {
74+ $token_url = $github_api ? {
75+ ' https://api.github.com' => " ${github_api} /repos/${org_name} /actions/runners/registration-token" ,
76+ default => " ${github_api} /orgs/${org_name} /actions/runners/registration-token" ,
77+ }
7378 }
7479
7580 $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