Skip to content
This repository was archived by the owner on Nov 24, 2023. It is now read-only.

Commit 93080f5

Browse files
committed
Ordering
1 parent ffcaab8 commit 93080f5

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

manifests/instance.pp

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -67,20 +67,22 @@
6767
$assured_labels = ''
6868
}
6969

70-
if $repo_name {
71-
$token_url = "${github_api}/repos/${org_name}/${repo_name}/actions/runners/registration-token"
72-
$url = "${github_domain}/${org_name}/${repo_name}"
73-
} elsif $org_name {
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-
}
78-
$url = "${github_domain}/${org_name}"
70+
71+
if $org_name {
72+
if $repo_name {
73+
$token_url = "${github_api}/repos/${org_name}/${repo_name}/actions/runners/registration-token"
74+
$url = "${github_domain}/${org_name}/${repo_name}"
75+
} else {
76+
$token_url = $github_api ? {
77+
'https://api.github.com' => "${github_api}/repos/${org_name}/actions/runners/registration-token",
78+
default => "${github_api}/orgs/${org_name}/actions/runners/registration-token",
79+
}
80+
$url = "${github_domain}/${org_name}"
7981
} elsif $enterprise_name {
8082
$token_url = "${github_api}/enterprises/${enterprise_name}/actions/runners/registration-token"
8183
$url = "${github_domain}/enterprises/${enterprise_name}"
8284
} else {
83-
fail("At least one of 'repo_name', 'org_name', 'enterprise_name' is required to create runner instances.")
85+
fail("Either 'org_name' or 'enterprise_name' is required to create runner instances")
8486
}
8587

8688
$archive_name = "${github_actions_runner::package_name}-${github_actions_runner::package_ensure}.tar.gz"

0 commit comments

Comments
 (0)