--- description: List all global runners on Gitea server --- List all global runners registered on the Gitea server. ## ๅทฅไฝœ็›ฎๅฝ• **macOS / Linux:** ``` ~/.config/gitea/ ``` **Windows:** ``` %USERPROFILE%\.config\gitea\ ``` Please perform the following: 1. **Read Gitea configuration:** - Read from config file: - macOS/Linux: `~/.config/gitea/config.env` - Windows: `%USERPROFILE%\.config\gitea\config.env` - Extract: - `GITEA_URL`: Gitea server URL - `GITEA_TOKEN`: API token (admin permission required) - If config not found: prompt user to run `/gitea-reset` first 2. **Call Gitea API to list runners:** ```bash curl -s -H "Authorization: token " \ "/api/v1/admin/actions/runners" ``` 3. **Parse JSON response and extract information:** - Response structure: ```json { "runners": [...], "total_count": 1 } ``` - Use `jq` to parse JSON - For each runner in `runners` array: - `id`: Runner ID - `name`: Runner name - `status`: Runner status ("online"/"offline") - `busy`: Whether runner is currently busy (true/false) - `ephemeral`: Whether runner is ephemeral (true/false) - `labels`: Array of label objects with `name` and `type` 4. **Determine runner status:** - ๐ŸŸข ๅœจ็บฟ - `status: "online"` - ๐Ÿ”ด ็ฆป็บฟ - `status: "offline"` - โš ๏ธ ๆœช็Ÿฅ - Unable to determine 5. **Filter global runners:** - The API endpoint `/api/v1/admin/actions/runners` returns all global runners - These are runners registered at the instance level (not org or repo specific) 6. **Display summary in Chinese:** ``` โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ” Gitea ๅ…จๅฑ€ Runners โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ” ๆœๅŠกๅ™จ: [server_url] ๆ€ป่ฎก: N ไธชๅ…จๅฑ€ runner [runner-name] ็Šถๆ€: ๐ŸŸข/๐Ÿ”ด [ๅœจ็บฟ/็ฆป็บฟ] ID: [id] ๅฟ™็ขŒ: ๆ˜ฏ/ๅฆ ไธดๆ—ถ: ๆ˜ฏ/ๅฆ ๆ ‡็ญพ: [comma-separated labels] โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ” ็ฎก็†ๅ‘ฝไปค โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ” ๆŸฅ็œ‹้…็ฝฎ: /gitea-config ๅˆ›ๅปบ runner: /gitea-create-runner ๅˆ ้™ค runner: /gitea-delete-runner ``` **Notes:** - Requires admin API token to list runners - **Correct API endpoint**: `/api/v1/admin/actions/runners` (not `/api/v1/admin/runners`) - Only shows global runners (instance-level runners) - Uses `jq` for JSON parsing - Response includes: `id`, `name`, `status`, `busy`, `ephemeral`, `labels` - If API call fails, show error message and suggest checking token permissions - Tested with Gitea version 1.25.3