docs: correct act_runner setup — binary install, host labels, docker-less config
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -48,41 +48,58 @@ Then restart Gitea.
|
||||
|
||||
### 2. Install act_runner on the Mac
|
||||
|
||||
```bash
|
||||
brew install act-runner
|
||||
```
|
||||
There is no Homebrew formula — download the official binary:
|
||||
|
||||
Or download the binary from your Gitea instance:
|
||||
`http://10.10.1.21:3002/-/admin/runners`
|
||||
```bash
|
||||
curl -sL -o /usr/local/bin/act_runner \
|
||||
https://dl.gitea.com/act_runner/0.6.1/act_runner-0.6.1-darwin-arm64
|
||||
chmod +x /usr/local/bin/act_runner
|
||||
```
|
||||
|
||||
### 3. Register the runner
|
||||
|
||||
Get a registration token from:
|
||||
**Repository Settings → Actions → Runners → Create Runner**
|
||||
(or via API: `GET /api/v1/repos/kutesir/jarvis/actions/runners/registration-token`)
|
||||
|
||||
Then:
|
||||
The `:host` label suffix is required — it makes jobs run directly on the Mac
|
||||
instead of in Docker (which xcodebuild needs, and the Mac has no Docker):
|
||||
|
||||
```bash
|
||||
act_runner register \
|
||||
mkdir -p ~/.act_runner && cd ~/.act_runner
|
||||
act_runner register --no-interactive \
|
||||
--instance http://10.10.1.21:3002 \
|
||||
--token <RUNNER_TOKEN> \
|
||||
--name "mac-mini" \
|
||||
--labels "self-hosted,macos"
|
||||
--labels "self-hosted:host,macos:host"
|
||||
```
|
||||
|
||||
### 4. Start the runner
|
||||
### 4. Configure and start the runner
|
||||
|
||||
Generate the config, then fix two defaults that break Docker-less Macs
|
||||
(the generated config ships Docker-based ubuntu labels that make the daemon
|
||||
refuse to start without a Docker socket):
|
||||
|
||||
```bash
|
||||
act_runner daemon
|
||||
cd ~/.act_runner
|
||||
act_runner generate-config > config.yaml
|
||||
# 1. labels: [] — empty falls back to the :host labels in .runner
|
||||
# 2. docker_host: "-" — never look for a Docker daemon
|
||||
```
|
||||
|
||||
To run it as a background service:
|
||||
In `config.yaml`, set:
|
||||
- `labels: []` (replace the default ubuntu docker labels)
|
||||
- `docker_host: "-"` (under `container:`)
|
||||
|
||||
Then start it:
|
||||
|
||||
```bash
|
||||
brew services start act-runner # if installed via brew
|
||||
# or add a launchd plist manually
|
||||
act_runner daemon --config ~/.act_runner/config.yaml
|
||||
```
|
||||
|
||||
To keep it running across reboots, load it as a LaunchAgent
|
||||
(`~/Library/LaunchAgents/com.gitea.act-runner.plist`, see repo scripts).
|
||||
|
||||
The runner must have **Xcode 16+** installed and accepted the license:
|
||||
|
||||
```bash
|
||||
|
||||
Reference in New Issue
Block a user