This repository was archived by the owner on Feb 11, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
images/base/helper-scripts Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -10,17 +10,20 @@ last_char="${GH_API_ENDPOINT: -1}"
10
10
readonly _GH_API_ENDPOINT=" ${GH_API_ENDPOINT:- https:// api.github.com} "
11
11
12
12
# Org/ Repo details
13
- if [ -z " $GH_ORG " ]; then
13
+ if [ -n " $GH_ORG " ]; then
14
14
readonly RUNNER_URL=" ${_GH_URL} /${GH_ORG} "
15
15
readonly RUNNER_REG_TOKEN_URL=" ${_GH_API_ENDPOINT} /orgs/${GH_ORG} /actions/runners/registration-token"
16
- elif [ -z " $GH_REPO " ]; then
16
+ elif [ -n " $GH_ORG " ] && [ -n " $GH_REPO " ]; then
17
17
readonly RUNNER_URL=" ${_GH_URL} /${GH_ORG} /${GH_REPO} "
18
18
readonly RUNNER_REG_TOKEN_URL=" ${_GH_API_ENDPOINT} /repos/${GH_ORG} /${GH_REPO} /actions/runners/registration-token"
19
- elif [ -z " $GH_ENTERPRISE " ]; then
19
+ elif [ -n " $GH_ENTERPRISE " ]; then
20
20
readonly RUNNER_URL=" ${_GH_URL} /${GH_ENTERPRISE} "
21
21
readonly RUNNER_REG_TOKEN_URL=" ${_GH_API_ENDPOINT} /enterprises/${GH_ENTERPRISEs} /actions/runners/registration-token"
22
22
else
23
- echo " Please provide Organisation detail by setting GH_ORG"
23
+ echo " Please provide the following credentials:"
24
+ echo " Repository: GH_ORG and GH_REPO"
25
+ echo " Organisation: GH_ORG"
26
+ echo " Enterprise: GH_ENTERPRISE"
24
27
exit 255
25
28
fi
26
29
You can’t perform that action at this time.
0 commit comments