feat: implement Gitea Actions / CI-CD workflows #14

Open
opened 2026-06-02 06:57:03 +00:00 by a-limasov · 0 comments
Owner

Context

Gitea Actions is the built-in CI/CD system (compatible with GitHub Actions syntax).
These endpoints allow listing and triggering workflows, inspecting run results,
downloading artifacts, and managing runners — the full CI automation surface.

Endpoints to implement

Method Path Tool name Description
GET /repos/{owner}/{repo}/actions/runs list_workflow_runs List workflow runs
GET /repos/{owner}/{repo}/actions/runs/{run_id} get_workflow_run Get single run details
DELETE /repos/{owner}/{repo}/actions/runs/{run_id} delete_workflow_run Delete a run
POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel cancel_workflow_run Cancel a running workflow
GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs list_run_jobs List jobs in a run
GET /repos/{owner}/{repo}/actions/jobs/{job_id} get_workflow_job Get single job
GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts list_run_artifacts List artifacts
GET /repos/{owner}/{repo}/actions/workflows list_workflows List workflow definitions
PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable enable_workflow Enable a workflow
PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable disable_workflow Disable a workflow
POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches trigger_workflow Manually trigger workflow
GET /repos/{owner}/{repo}/actions/secrets list_repo_action_secrets List Actions secrets
PUT /repos/{owner}/{repo}/actions/secrets/{secretname} set_repo_action_secret Create/update secret
DELETE /repos/{owner}/{repo}/actions/secrets/{secretname} delete_repo_action_secret Delete secret
GET /repos/{owner}/{repo}/actions/variables list_repo_action_variables List Actions variables
POST /repos/{owner}/{repo}/actions/variables/{variablename} create_repo_action_variable Create variable
PUT /repos/{owner}/{repo}/actions/variables/{variablename} update_repo_action_variable Update variable
DELETE /repos/{owner}/{repo}/actions/variables/{variablename} delete_repo_action_variable Delete variable

Acceptance Criteria

  • list_workflow_runs(owner, repo, status, limit, page)status: waiting | running | success | failure | cancelled | skipped
  • trigger_workflow(owner, repo, workflow_id, ref, inputs)ref is branch/tag, inputs is dict
  • set_repo_action_secret encrypts nothing — just passes value; Gitea handles encryption server-side
  • Secrets are write-only — list returns names only (no values), consistent with GitHub Actions behavior
  • list_run_artifacts returns artifact metadata; downloading artifact binaries is out of scope

Technical Notes

  • POST /dispatches body: {"ref": "main", "inputs": {"key": "value"}}
  • PUT /secrets/{name} body: {"data": "secret_value", "name": "SECRET_NAME"}
  • POST /variables/{name} body: {"name": "VAR_NAME", "value": "var_value"}
  • Workflow {workflow_id} is the filename (e.g. ci.yml), not an integer ID
  • This is the largest batch — consider splitting into two sessions: (1) runs/jobs/artifacts, (2) secrets/variables/workflows
## Context Gitea Actions is the built-in CI/CD system (compatible with GitHub Actions syntax). These endpoints allow listing and triggering workflows, inspecting run results, downloading artifacts, and managing runners — the full CI automation surface. ## Endpoints to implement | Method | Path | Tool name | Description | |--------|------|-----------|-------------| | GET | `/repos/{owner}/{repo}/actions/runs` | `list_workflow_runs` | List workflow runs | | GET | `/repos/{owner}/{repo}/actions/runs/{run_id}` | `get_workflow_run` | Get single run details | | DELETE | `/repos/{owner}/{repo}/actions/runs/{run_id}` | `delete_workflow_run` | Delete a run | | POST | `/repos/{owner}/{repo}/actions/runs/{run_id}/cancel` | `cancel_workflow_run` | Cancel a running workflow | | GET | `/repos/{owner}/{repo}/actions/runs/{run_id}/jobs` | `list_run_jobs` | List jobs in a run | | GET | `/repos/{owner}/{repo}/actions/jobs/{job_id}` | `get_workflow_job` | Get single job | | GET | `/repos/{owner}/{repo}/actions/runs/{run_id}/artifacts` | `list_run_artifacts` | List artifacts | | GET | `/repos/{owner}/{repo}/actions/workflows` | `list_workflows` | List workflow definitions | | PUT | `/repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable` | `enable_workflow` | Enable a workflow | | PUT | `/repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable` | `disable_workflow` | Disable a workflow | | POST | `/repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches` | `trigger_workflow` | Manually trigger workflow | | GET | `/repos/{owner}/{repo}/actions/secrets` | `list_repo_action_secrets` | List Actions secrets | | PUT | `/repos/{owner}/{repo}/actions/secrets/{secretname}` | `set_repo_action_secret` | Create/update secret | | DELETE | `/repos/{owner}/{repo}/actions/secrets/{secretname}` | `delete_repo_action_secret` | Delete secret | | GET | `/repos/{owner}/{repo}/actions/variables` | `list_repo_action_variables` | List Actions variables | | POST | `/repos/{owner}/{repo}/actions/variables/{variablename}` | `create_repo_action_variable` | Create variable | | PUT | `/repos/{owner}/{repo}/actions/variables/{variablename}` | `update_repo_action_variable` | Update variable | | DELETE | `/repos/{owner}/{repo}/actions/variables/{variablename}` | `delete_repo_action_variable` | Delete variable | ## Acceptance Criteria - [ ] `list_workflow_runs(owner, repo, status, limit, page)` — `status`: `waiting` | `running` | `success` | `failure` | `cancelled` | `skipped` - [ ] `trigger_workflow(owner, repo, workflow_id, ref, inputs)` — `ref` is branch/tag, `inputs` is dict - [ ] `set_repo_action_secret` encrypts nothing — just passes value; Gitea handles encryption server-side - [ ] Secrets are write-only — list returns names only (no values), consistent with GitHub Actions behavior - [ ] `list_run_artifacts` returns artifact metadata; downloading artifact binaries is out of scope ## Technical Notes - `POST /dispatches` body: `{"ref": "main", "inputs": {"key": "value"}}` - `PUT /secrets/{name}` body: `{"data": "secret_value", "name": "SECRET_NAME"}` - `POST /variables/{name}` body: `{"name": "VAR_NAME", "value": "var_value"}` - Workflow `{workflow_id}` is the filename (e.g. `ci.yml`), not an integer ID - This is the largest batch — consider splitting into two sessions: (1) runs/jobs/artifacts, (2) secrets/variables/workflows
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: a-limasov/gitea-platform-mcp#14