support runner labels

This commit is contained in:
Reinier Timmer
2020-04-24 11:29:52 +02:00
parent 2567f6ee4e
commit 8c5b776807
7 changed files with 45 additions and 1 deletions

View File

@@ -16,13 +16,17 @@ else
exit 1
fi
if [ -n "${RUNNER_LABELS}" ]; then
LABEL_ARG="--labels ${RUNNER_LABELS}"
fi
if [ -z "${RUNNER_TOKEN}" ]; then
echo "RUNNER_TOKEN must be set" 1>&2
exit 1
fi
cd /runner
./config.sh --unattended --replace --name "${RUNNER_NAME}" --url "https://github.com/${ATTACH}" --token "${RUNNER_TOKEN}"
./config.sh --unattended --replace --name "${RUNNER_NAME}" --url "https://github.com/${ATTACH}" --token "${RUNNER_TOKEN}" ${LABEL_ARG}
unset RUNNER_NAME RUNNER_REPO RUNNER_TOKEN
exec ./run.sh --once