add GITEA_RUNNER_JOB_CONTAINER_DOCKER_HOST variable

This commit is contained in:
sebthom 2023-06-30 23:06:57 +02:00
parent 0d730e4911
commit 487c6908d0
5 changed files with 15 additions and 4 deletions

View File

@ -3,7 +3,7 @@
# SPDX-License-Identifier: Apache-2.0
# SPDX-ArtifactOfProjectHomePage: https://github.com/vegardit/docker-gitea-act-runner
#
# https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
name: Build
on:

View File

@ -133,6 +133,7 @@ GITEA_RUNNER_ENV_FILE|`/data/.env`|Extra environment variables to run jobs from
GITEA_RUNNER_FETCH_TIMEOUT|`5s`|The timeout for fetching the job from the Gitea instance
GITEA_RUNNER_FETCH_INTERVAL|`2s`|The interval for fetching the job from the Gitea instance
GITEA_RUNNER_MAX_PARALLEL_JOBS|`1`|Maximum number of concurrently executed jobs
GITEA_RUNNER_JOB_CONTAINER_DOCKER_HOST|`<empty>`|If empty, the available docker host is located automatically. If set to `-`, the available docker host is located automatically, but the docker host won't be mounted to the job containers. If it's any other value, the specified docker host will be used.
GITEA_RUNNER_JOB_CONTAINER_NETWORK|`bridge`|Docker network to use with job containers. Can be `bridge`, `host`, `none`, or the name of a custom network
GITEA_RUNNER_JOB_CONTAINER_PRIVILEGED|`false`|Whether to run jobs in containers with privileged mode which is required for **Docker-in-Docker** aka **dind**
GITEA_RUNNER_JOB_CONTAINER_OPTIONS|`none`|Additional container launch options (eg, --add-host=my.gitea.url:host-gateway)

View File

@ -214,7 +214,7 @@ RUN <<EOF
echo "#################################################"
echo "Writing build_info..."
echo "#################################################"
echo -e "
echo "
GIT_REPO: $GIT_REPO_URL
GIT_BRANCH: $GIT_BRANCH
GIT_COMMIT: $GIT_COMMIT_HASH @ $GIT_COMMIT_DATE

View File

@ -1,4 +1,4 @@
# based on https://gitea.com/gitea/act_runner/src/tag/v0.2.0/internal/pkg/config/config.example.yaml
# based on https://gitea.com/gitea/act_runner/src/tag/v0.2.1/internal/pkg/config/config.example.yaml
log:
# The level of logging, can be trace, debug, info, warn, error, fatal
@ -65,3 +65,13 @@ container:
# The parent directory of a job's working directory.
# If it's empty, /workspace will be used.
workdir_parent: ${GITEA_RUNNER_JOB_CONTAINER_WORKDIR_PARENT:-/workspace}
# overrides the docker client host with the specified one.
# If it's empty, act_runner will find an available docker host automatically.
# If it's "-", act_runner will find an available docker host automatically, but the docker host won't be mounted to the job containers and service containers.
# If it's not empty or "-", the specified docker host will be used. An error will be returned if it doesn't work.
docker_host: ${GITEA_RUNNER_JOB_CONTAINER_DOCKER_HOST:-}
host:
# The parent directory of a job's working directory.
# If it's empty, $HOME/.cache/act/ will be used.
workdir_parent: ${GITEA_RUNNER_HOST_WORKDIR_PARENT:-}

View File

@ -4,7 +4,7 @@
# SPDX-FileContributor: Sebastian Thomschke
# SPDX-License-Identifier: Apache-2.0
# SPDX-ArtifactOfProjectHomePage: https://github.com/vegardit/docker-gitea-act-runner
#
source /opt/bash-init.sh
#################################################################