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 52
52
String $user,
53
53
String $group,
54
54
Hash[String, Hash] $instances,
55
+ String $github_domain,
56
+ String $github_api,
55
57
) {
56
58
57
59
$root_dir = " ${github_actions_runner::base_dir_name} -${github_actions_runner::package_ensure} "
Original file line number Diff line number Diff line change 40
40
String $instance_name = $title,
41
41
Optional[Array[String]] $labels = undef ,
42
42
Optional[String] $repo_name = undef ,
43
-
43
+ String $github_domain = $github_actions_runner::github_domain,
44
+ String $github_api = $github_actions_runner::github_api,
44
45
) {
45
46
46
47
if $labels {
51
52
}
52
53
53
54
$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} " ,
56
57
}
57
58
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
+ }
61
66
}
62
67
63
68
$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