Files
docker-templates/gitea/README.md
T
2026-09-19 01:20:50 -05:00

1.9 KiB

Gitea + Gitea Actions runner

Deploys Gitea with Actions enabled plus one act_runner that picks up jobs.

Start

  1. Copy config.yaml to the runner data dir on the Docker host:

    mkdir -p /portainer/Files/AppData/Config/Gitea-runner
    cp config.yaml /portainer/Files/AppData/Config/Gitea-runner/config.yaml
    
  2. In Gitea, go to Site Administration -> Actions -> Runners -> Create new Runner and copy the registration token.

  3. Start the stack with the token (first start registers the runner; the .runner file persisted in /data keeps it registered):

    GITEA_RUNNER_REGISTRATION_TOKEN=<token> docker compose up -d
    

    Optional overrides: GITEA_INSTANCE_URL (default http://gitea:3000), GITEA_RUNNER_NAME, GITEA_RUNNER_LABELS.

  4. Confirm the runner shows as active under Site Administration -> Actions -> Runners.

Live workflows

These run on this repo itself (repo root .gitea/workflows/):

  • test.yml — external CI health check (uv, dbt, R2, prod probe)
  • hello-world.yaml — checkout + node smoke test on ubuntu-latest
  • scheduled-echo.yaml — cron + manual trigger example

Sample workflow

sample-workflows/docker-build.yaml is a Buildx build template (with commented-out push steps) you can copy into any repo hosted on this Gitea instance as .gitea/workflows/*.yaml or .github/workflows/*.yaml. It stays out of the root because this repo has no Dockerfile.

Notes

  • GITEA__actions__ENABLED=true is already set on the gitea service; without it the Actions tab stays disabled.
  • The runner needs /var/run/docker.sock so docker:// labels can start job containers. Jobs therefore run with the trust level of anything that can use the host Docker daemon — only connect this runner to repos you trust, or scope tokens via per-repo runner groups.
  • Image gitea/act_runner:latest tracks the stable runner; the same image is also published as gitea/runner:latest.