diff --git a/scripts/run.sh b/scripts/run.sh index 220da06..1880723 100755 --- a/scripts/run.sh +++ b/scripts/run.sh @@ -16,6 +16,13 @@ EXTRA_ARGS="" if [[ ! -z "${GITEA_RUNNER_LABELS}" ]]; then EXTRA_ARGS="${EXTRA_ARGS} --labels ${GITEA_RUNNER_LABELS}" fi +if [[ ! -z "${GITEA_RUNNER_EPHEMERAL}" ]]; then + EXTRA_ARGS="${EXTRA_ARGS} --ephemeral" +fi +RUN_ARGS="" +if [[ ! -z "${GITEA_RUNNER_ONCE}" ]]; then + RUN_ARGS="${RUN_ARGS} --once" +fi # In case no token is set, it's possible to read the token from a file, i.e. a Docker Secret if [[ -z "${GITEA_RUNNER_REGISTRATION_TOKEN}" ]] && [[ -f "${GITEA_RUNNER_REGISTRATION_TOKEN_FILE}" ]]; then @@ -54,4 +61,4 @@ fi unset GITEA_RUNNER_REGISTRATION_TOKEN unset GITEA_RUNNER_REGISTRATION_TOKEN_FILE -exec act_runner daemon ${CONFIG_ARG} +exec act_runner daemon ${CONFIG_ARG} ${RUN_ARGS}