GRM-124: docs: fix outdated references and document health/restart/trigger-workflow commands
Post-merge / detect-type (push) Successful in 53s
Post-merge / release (push) Successful in 59s
Post-merge / validate-commit-msg (push) Successful in 1m20s
Post-merge / publish (push) Has been skipped
Post-merge / badges (push) Successful in 1m43s
Post-merge / sync-wiki (push) Successful in 2m5s
Post-merge / vikunja (push) Successful in 1m9s
Post-merge / configure-repo (push) Successful in 1m8s

This commit was merged in pull request #190.
This commit is contained in:
2026-07-01 00:18:44 +00:00
parent 32f0ad5cb3
commit 358620401d
5 changed files with 106 additions and 7 deletions
+90
View File
@@ -10,11 +10,14 @@ GRM provides the following CLI commands for managing Gitea Actions runners. The
| `grm update` | `<host>` | Update the gitea_runner binary on a remote host |
| `grm start` | `<runner_name>` | Start a registered runner |
| `grm stop` | `<runner_name>` | Stop a registered runner |
| `grm restart` | `<runner_name>` | Restart a runner (stop, prune Docker images, start) |
| `grm enable` | `<runner_name>` | Enable a runner to start on boot |
| `grm disable` | `<runner_name>` | Disable and deregister a runner |
| `grm status` | `<runner_name>` | Check the status of a registered runner |
| `grm remove` | `<runner_name>` | Remove a runner completely |
| `grm list` | — | List all registered runners with live status |
| `grm health` | `[runner_name]` | Run health check (Docker, runner service, disk) on one or all runners |
| `grm trigger-workflow` | `<workflow_id>` | Trigger a Gitea Actions workflow via the API |
| `grm --version` | — | Show the installed version |
### Common lifecycle options
@@ -139,6 +142,29 @@ grm stop <runner_name> [options]
| `--key` | `-k` | Override SSH key from registry |
| `--ask-become-pass/--no-ask-become-pass` | — | Prompt for sudo password (default) or skip it |
## restart
Restart a registered Gitea Runner (stop, prune Docker images, start).
```bash
grm restart <runner_name> [options]
```
**Arguments:**
| Argument | Description |
|----------|-------------|
| `runner_name` | Name of the registered runner |
**Options (common lifecycle options):**
| Option | Short | Description |
|--------|-------|-------------|
| `--host` | — | Override host from registry |
| `--user` | `-u` | Override user from registry |
| `--key` | `-k` | Override SSH key from registry |
| `--ask-become-pass/--no-ask-become-pass` | — | Prompt for sudo password (default) or skip it |
## enable
Enable a registered Gitea Runner to start on boot.
@@ -276,6 +302,70 @@ If no runners are registered:
No runners registered. Use 'grm install' to add one.
```
## health
Run a health check on one or all registered runners. Checks Docker daemon status, Gitea runner service status, and disk space usage. Unhealthy services are automatically restarted by the healthcheck script.
```bash
grm health [runner_name] [options]
```
**Arguments:**
| Argument | Description |
|----------|-------------|
| `runner_name` | (optional) Name of the runner to check. If omitted, checks all registered runners. |
**Options (common lifecycle options):**
| Option | Short | Description |
|--------|-------|-------------|
| `--host` | — | Override host from registry |
| `--user` | `-u` | Override user from registry |
| `--key` | `-k` | Override SSH key from registry |
| `--ask-become-pass/--no-ask-become-pass` | — | Prompt for sudo password (default) or skip it |
**Example:**
```bash
grm health
# Check a specific runner:
grm health prod-runner
```
Output shows NAME, HOST, HEALTHY (yes/no), and MESSAGE columns. The command exits with code 1 if any runner is unhealthy.
The health check is also run automatically via a systemd timer installed by the Ansible role. See `ansible/roles/gitea-runner/templates/runner-healthcheck.sh.j2` for the script and `runner-healthcheck.timer.j2` for the timer.
## trigger-workflow
Trigger a Gitea Actions workflow via the API.
```bash
grm trigger-workflow <workflow_id> [options]
grm trigger-workflow --list
```
**Arguments:**
| Argument | Description |
|----------|-------------|
| `workflow_id` | Workflow filename (e.g., `ci.yml`) or ID |
**Options:**
| Option | Description |
|--------|-------------|
| `--list` | List available workflows in the repository |
| `--ref` | Branch or tag to trigger on (default: repository default branch) |
**Example:**
```bash
grm trigger-workflow --list
grm trigger-workflow ci.yml --ref master
```
## --version
Show the installed GRM version.