From 75d15ee91bb8aa1cebe214e42195c2501228d4d4 Mon Sep 17 00:00:00 2001 From: Reinier Timmer Date: Fri, 24 Apr 2020 07:17:09 +0200 Subject: [PATCH] backwards compatibility of dockerfile --- runner/entrypoint.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/runner/entrypoint.sh b/runner/entrypoint.sh index ca59a7cf..32d4ae31 100755 --- a/runner/entrypoint.sh +++ b/runner/entrypoint.sh @@ -5,15 +5,15 @@ if [ -z "${RUNNER_NAME}" ]; then exit 1 fi -if [ -z "${RUNNER_ORG}" ]; then - echo "RUNNER_ORG must be set" 1>&2 - exit 1 -fi - -ATTACH="${RUNNER_ORG}" - -if [ ! -z "${RUNNER_REPO}" ]; then +if [ -n "${RUNNER_ORG}" -a -n "${RUNNER_REPO}" ]; then ATTACH="${RUNNER_ORG}/${RUNNER_REPO}" +elif [ -n "${RUNNER_ORG}" ]; then + ATTACH="${RUNNER_ORG}" +elif [ -n "${RUNNER_REPO}" ]; then + ATTACH="${RUNNER_REPO}" +else + echo "At least one of RUNNER_ORG or RUNNER_REPO must be set" 1>&2 + exit 1 fi if [ -z "${RUNNER_TOKEN}" ]; then