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'
9
9
github_actions_runner::user : ' root'
10
10
github_actions_runner::group : ' root'
11
11
github_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 58
58
String $user,
59
59
String $group,
60
60
Hash[String, Hash] $instances,
61
+ String $github_domain,
62
+ String $github_api,
61
63
Optional[String] $http_proxy = undef ,
62
64
Optional[String] $https_proxy = undef ,
63
65
Optional[String] $no_proxy = undef ,
Original file line number Diff line number Diff line change 52
52
Optional[String] $no_proxy = $github_actions_runner::no_proxy,
53
53
Optional[Array[String]] $labels = undef ,
54
54
Optional[String] $repo_name = undef ,
55
-
55
+ String $github_domain = $github_actions_runner::github_domain,
56
+ String $github_api = $github_actions_runner::github_api,
56
57
) {
57
58
58
59
if $labels {
63
64
}
64
65
65
66
$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} " ,
68
69
}
69
70
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
+ }
73
78
}
74
79
75
80
$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