2020-01-28 21:56:54 +09:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
|
|
if [ -z "${RUNNER_NAME}" ]; then
|
|
|
|
|
echo "RUNNER_NAME must be set" 1>&2
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if [ -z "${RUNNER_REPO}" ]; then
|
|
|
|
|
echo "RUNNER_REPO must be set" 1>&2
|
|
|
|
|
exit 1
|
|
|
|
|
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/${RUNNER_REPO}" --token "${RUNNER_TOKEN}"
|
2020-02-06 22:15:26 +09:00
|
|
|
|
|
|
|
|
unset RUNNER_NAME RUNNER_REPO RUNNER_TOKEN
|
2020-02-06 18:47:50 +09:00
|
|
|
exec ./run.sh --once
|