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}"
1010readonly _GH_API_ENDPOINT=" ${GH_API_ENDPOINT:- https:// api.github.com} "
1111
1212# Org/ Repo details
13- if [ -z " $GH_ORG " ]; then
13+ if [ -n " $GH_ORG " ]; then
1414 readonly RUNNER_URL=" ${_GH_URL} /${GH_ORG} "
1515 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
1717 readonly RUNNER_URL=" ${_GH_URL} /${GH_ORG} /${GH_REPO} "
1818 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
2020 readonly RUNNER_URL=" ${_GH_URL} /${GH_ENTERPRISE} "
2121 readonly RUNNER_REG_TOKEN_URL=" ${_GH_API_ENDPOINT} /enterprises/${GH_ENTERPRISEs} /actions/runners/registration-token"
2222else
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"
2427 exit 255
2528fi
2629
You can’t perform that action at this time.
0 commit comments