From 457b67892c36f5e7dd8a726ee95f7598b7f8f371 Mon Sep 17 00:00:00 2001 From: sebthom Date: Mon, 1 Sep 2025 16:00:26 +0200 Subject: [PATCH] feat: add GITEA_RUNNER_GITHUB_MIRROR env var --- .github/workflows/build.yml | 2 +- README.md | 1 + image/config.template.yaml | 7 ++++++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 50c1386..aa95f05 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -31,8 +31,8 @@ on: # https://docs.github.com/en/actions/reference/events-that-trigger-workflow - '.act*' - '.editorconfig' - '.git*' - - '.github/ISSUE_TEMPLATE/*' - '.github/*.yml' + - '.github/ISSUE_TEMPLATE/*' - '.github/workflows/stale.yml' workflow_dispatch: # https://docs.github.com/en/actions/reference/events-that-trigger-workflows#workflow_dispatch diff --git a/README.md b/README.md index cdfe7cf..52a5dec 100644 --- a/README.md +++ b/README.md @@ -284,6 +284,7 @@ GITEA_RUNNER_LOG_LEVEL|`info`|The level of logging, can be trace, debug, info, w GITEA_RUNNER_ENV_FILE|`/data/.env`|Extra environment variables to run jobs from a file 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_GITHUB_MIRROR|``| Base URL to use instead of https://github.com when fetching GitHub Actions. GITEA_RUNNER_MAX_PARALLEL_JOBS|`1`|Maximum number of concurrently executed jobs GITEA_RUNNER_JOB_CONTAINER_DOCKER_HOST|``|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 diff --git a/image/config.template.yaml b/image/config.template.yaml index 61d7bf8..ac985d1 100644 --- a/image/config.template.yaml +++ b/image/config.template.yaml @@ -1,4 +1,4 @@ -# based on https://gitea.com/gitea/act_runner/src/tag/v0.2.12/internal/pkg/config/config.example.yaml +# based on https://gitea.com/gitea/act_runner/src/tag/v0.2.13/internal/pkg/config/config.example.yaml log: # The level of logging, can be trace, debug, info, warn, error, fatal @@ -36,6 +36,11 @@ runner: fetch_timeout: '${GITEA_RUNNER_FETCH_TIMEOUT:-5s}' # The interval for fetching the job from the Gitea instance. fetch_interval: '${GITEA_RUNNER_FETCH_INTERVAL:-2s}' + # The github_mirror of a runner is used to specify the mirror address of the github that pulls the action repository. + # It works when something like `uses: actions/checkout@v4` is used and DEFAULT_ACTIONS_URL is set to github, + # and github_mirror is not empty. In this case, + # it replaces https://github.com with the value here, which is useful for some special network environments. + github_mirror: '${GITEA_RUNNER_GITHUB_MIRROR:-}' # The labels of a runner are used to determine which jobs the runner can run, and how to run them. # Like: "macos-arm64:host" or "ubuntu-latest:docker://docker.gitea.com/runner-images:ubuntu-latest" # Find more images provided by Gitea at https://gitea.com/docker.gitea.com/runner-images .