mirror of
https://gitea.com/gitea/act_runner.git
synced 2026-05-02 00:40:41 +08:00
## Consumer-facing breaking changes
- **Go module path**: `gitea.com/gitea/act_runner` → `gitea.com/gitea/runner`. Anything importing `act/...` or `internal/...` packages (notably Gitea itself) must update imports.
- **Binary name**: `act_runner` → `gitea-runner`. Wrapper scripts, systemd units, init scripts, and documentation referencing the binary by `act_runner` will break.
- **Docker image**: `gitea/act_runner` → `gitea/runner` (incl. `*-dind-rootless` variants). Users pulling `gitea/act_runner:nightly` etc. will get stale images. Note: the image name is `gitea/runner`, not `gitea/gitea-runner`.
- **Release artifact paths**: S3 directory `act_runner/{{.Version}}` → `gitea-runner/{{.Version}}`, and artifact filenames change with the new project name. Existing download URLs break.
- **Metrics namespace**: changed from `act_runner` to `gitea_runner` (e.g. `act_runner_jobs_total` → `gitea_runner_jobs_total`); existing monitors/dashboards must be updated.
- **ldflags version path**: `gitea.com/gitea/act_runner/internal/pkg/ver.version` → `gitea.com/gitea/runner/internal/pkg/ver.version`. Affects anyone building with custom ldflags.
- **Kubernetes example resource names**: `act-runner` / `act-runner-vol` → `runner` / `runner-vol`. Users who copied the manifests verbatim will see resource churn on apply.
- **s6 service name**: `scripts/s6/act_runner/` → `scripts/s6/gitea-runner/` (image-internal; only matters for downstream image overrides).
Unchanged: YAML config field names, env vars (`GITEA_*`), CLI flags/subcommands, registration file format.
---------
Co-authored-by: silverwind <me@silverwind.io>
Reviewed-on: https://gitea.com/gitea/runner/pulls/850
Reviewed-by: Zettat123 <39446+zettat123@noreply.gitea.com>
Reviewed-by: silverwind <2021+silverwind@noreply.gitea.com>
Reviewed-by: Nicolas <bircni@icloud.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-committed-by: Lunny Xiao <xiaolunwen@gmail.com>
2.9 KiB
2.9 KiB
Using Rootless Docker withgitea-runner
Here is a simple example of how to set up gitea-runner with rootless Docker. It has been created with Debian, but other Linux should work the same way.
Note: This procedure needs a real login shell -- using sudo su or other method of accessing the account will fail some of the steps below.
As root:
- Create a user to run both
dockerandgitea-runner. In this example, we use a non-privileged account calledrootless.
useradd -m rootless
passwd rootless
apt-get install -y uidmap # Not mentioned but needed for docker rootless.
-
Install
docker-ce -
(Recommended) Disable the system-wide Docker daemon
systemctl disable --now docker.service docker.socket
As the rootless user:
- Follow the instructions for enabling rootless mode
- Add the following line to the
/home/rootless/.bashrc:
for f in ./.bashrc.d/*.bash; do echo "Processing $f file..."; . "$f"; done
- Create the .bashrc.d directory
mkdir ~/.bashrc.d - Add the following lines to the
/home/rootless/.bashrc.d/rootless-docker.bash:
export XDG_RUNTIME_DIR=/home/rootless/.docker/run
export PATH=/home/rootless/bin:$PATH
export DOCKER_HOST=unix:///run/user/$(id -u)/docker.sock
- Reboot. Ensure that the Docker process is working.
- Create a directory for saving
gitea-runnerdata between restarts
mkdir /home/rootless/gitea-runner
- Register the runner from the data directory
cd /home/rootless/gitea-runner
gitea-runner register
- Generate a
gitea-runnerconfiguration file in the data directory. Edit the file to adjust for the system.
gitea-runner generate-config >/home/rootless/gitea-runner/config
- Create a new user-level
systemdunit file as/home/rootless/.config/systemd/user/gitea-runner.servicewith the following contents:
Description=Gitea Actions runner
Documentation=https://gitea.com/gitea/runner
After=docker.service
[Service]
Environment=PATH=/home/rootless/bin:/sbin:/usr/sbin:/home/rootless/bin:/home/rootless/bin:/home/rootless/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
Environment=DOCKER_HOST=unix:///run/user/1001/docker.sock
ExecStart=/usr/bin/gitea-runner daemon -c /home/rootless/gitea-runner/config
ExecReload=/bin/kill -s HUP $MAINPID
WorkingDirectory=/home/rootless/gitea-runner
TimeoutSec=0
RestartSec=2
Restart=always
StartLimitBurst=3
StartLimitInterval=60s
LimitNOFILE=infinity
LimitNPROC=infinity
LimitCORE=infinity
TasksMax=infinity
Delegate=yes
Type=notify
NotifyAccess=all
KillMode=mixed
[Install]
WantedBy=default.target
- Reboot
After the system restarts, check that thegitea-runner is working and that the runner is connected to Gitea.
systemctl --user status gitea-runner
journalctl --user -xeu gitea-runner