Added environment variable for run.sh to specify runner state file.
Added environment variable `RUNNER_STATE_FILE` to let users specify where `run.sh` looks for the runner json file. Defaults to ``.runner`` to preserve the original behavior.
This commit is contained in:
parent
4c35288175
commit
b58112172a
1 changed files with 4 additions and 1 deletions
|
@ -6,6 +6,8 @@ fi
|
|||
|
||||
cd /data
|
||||
|
||||
RUNNER_STATE_FILE=${RUNNER_STATE_FILE:-'.runner'}
|
||||
|
||||
CONFIG_ARG=""
|
||||
if [[ ! -z "${CONFIG_FILE}" ]]; then
|
||||
CONFIG_ARG="--config ${CONFIG_FILE}"
|
||||
|
@ -21,8 +23,9 @@ if [[ -z "${GITEA_RUNNER_REGISTRATION_TOKEN}" ]] && [[ -f "${GITEA_RUNNER_REGIST
|
|||
fi
|
||||
|
||||
# Use the same ENV variable names as https://github.com/vegardit/docker-gitea-act-runner
|
||||
test -f "$RUNNER_STATE_FILE" || echo "$RUNNER_STATE_FILE is missing or not a regular file"
|
||||
|
||||
if [[ ! -s .runner ]]; then
|
||||
if [[ ! -s "$RUNNER_STATE_FILE" ]]; then
|
||||
try=$((try + 1))
|
||||
success=0
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue