Actions Extensions
Forgejo does not expose Actions run logs or detailed run metadata via its REST API. The proxy fills this gap by scraping the Forgejo web UI using an admin session and returning the data as JSON or plain text. The enriched jobs payload now includes job_index, attempt, log_url, html_url, and steps[] with human-readable durations.
Endpoints
Section titled “Endpoints”Latest Run
Section titled “Latest Run”| Method | Endpoint | Description |
|---|---|---|
GET | /api/v1/repos/{owner}/{repo}/actions/runs/latest | Get info about the latest run |
GET | /api/v1/repos/{owner}/{repo}/actions/runs/latest/logs | Download logs for the latest run |
GET | /api/v1/repos/{owner}/{repo}/actions/runs/latest/jobs | List jobs in the latest run |
GET | /api/v1/repos/{owner}/{repo}/actions/runs/latest/summary | Summary of the latest run |
POST | /api/v1/repos/{owner}/{repo}/actions/runs/latest/rerun | Trigger a rerun of the latest run |
Specific Run
Section titled “Specific Run”| Method | Endpoint | Description |
|---|---|---|
GET | /api/v1/repos/{owner}/{repo}/actions/runs/{run_number}/logs | Download logs for a specific run |
GET | /api/v1/repos/{owner}/{repo}/actions/runs/{run_number}/jobs | List jobs in a specific run |
GET | /api/v1/repos/{owner}/{repo}/actions/runs/{run_number}/summary | Summary of a specific run |
POST | /api/v1/repos/{owner}/{repo}/actions/runs/{run_number}/rerun | Trigger a rerun of a specific run |
Path Parameters
Section titled “Path Parameters”| Parameter | Description |
|---|---|
owner | Repository owner (user or organisation name) |
repo | Repository name |
run_number | The sequential run counter visible in the Forgejo web UI URL (e.g., /actions/runs/42) |
Query Parameters
Section titled “Query Parameters”| Parameter | Type | Description |
|---|---|---|
job | string | integer | Job name (string) or 0-based job index (integer) within the run (default: 0) |
attempt | integer | 1-based attempt number for the job (default: 1) |
workflow_id | string | Filter runs by workflow file name (e.g., ci.yml) |
status | string | Filter runs by status — e.g., success, failure, running, waiting |
Filtering Runs
Section titled “Filtering Runs”The GET .../actions/runs endpoint supports workflow_id and status query parameters to narrow results:
# List all runs for a specific workflowcurl -H 'Authorization: token $TOKEN' \ 'https://forgejo-proxy.hochguertel.work/api/v1/repos/myorg/myrepo/actions/runs?workflow_id=ci.yml'
# List only failed runscurl -H 'Authorization: token $TOKEN' \ 'https://forgejo-proxy.hochguertel.work/api/v1/repos/myorg/myrepo/actions/runs?status=failure'
# Combine filterscurl -H 'Authorization: token $TOKEN' \ 'https://forgejo-proxy.hochguertel.work/api/v1/repos/myorg/myrepo/actions/runs?workflow_id=ci.yml&status=failure'Latest Run for a Workflow
Section titled “Latest Run for a Workflow”Use workflow_id with the latest endpoint to get the most recent run of a specific workflow:
curl -H 'Authorization: token $TOKEN' \ 'https://forgejo-proxy.hochguertel.work/api/v1/repos/myorg/myrepo/actions/runs/latest?workflow_id=ci.yml'Examples
Section titled “Examples”# Download logs for the latest runcurl -H 'Authorization: token $TOKEN' \ 'https://forgejo-proxy.hochguertel.work/api/v1/repos/myorg/myrepo/actions/runs/latest/logs'
# Download logs for run #42 by job namecurl -H 'Authorization: token $TOKEN' \ 'https://forgejo-proxy.hochguertel.work/api/v1/repos/myorg/myrepo/actions/runs/42/logs?job=build'
# Download logs for run #42 by job index (second job)curl -H 'Authorization: token $TOKEN' \ 'https://forgejo-proxy.hochguertel.work/api/v1/repos/myorg/myrepo/actions/runs/42/logs?job=1'
# List jobs in the latest run filtered by workflowcurl -H 'Authorization: token $TOKEN' \ 'https://forgejo-proxy.hochguertel.work/api/v1/repos/myorg/myrepo/actions/runs/latest/jobs?workflow_id=ci.yml'
# Rerun the latest failed runcurl -X POST -H 'Authorization: token $TOKEN' \ 'https://forgejo-proxy.hochguertel.work/api/v1/repos/myorg/myrepo/actions/runs/latest/rerun'Jobs response shape
Section titled “Jobs response shape”Each item from .../jobs is enriched beyond the native Forgejo REST payload:
| Field | Meaning |
|---|---|
job_index | 0-based position of the job within the run |
attempt | retry attempt number for the job (1 = first attempt) |
log_url | proxy URL for the raw job logs |
html_url | upstream Forgejo job-attempt page used to extract step data |
steps[] | ordered UI step summaries with summary, status, and optional duration |
Example:
[ { "id": 91, "name": "build", "status": "failure", "job_index": 1, "attempt": 2, "log_url": "https://forgejo-proxy.hochguertel.work/api/v1/repos/myorg/myrepo/actions/runs/42/logs?job=1&attempt=2", "html_url": "https://pastoral-oyster.pikapod.net/myorg/myrepo/actions/runs/42/jobs/91?attempt=2", "steps": [ { "summary": "Set up job", "status": "success", "duration": "2s" }, { "summary": "Run tests", "status": "failure", "duration": "26s" } ] }]The job query parameter used by the logs endpoint accepts the same job_index value or the job name, so you can jump straight from the jobs payload to the matching log stream. The CLI’s thfg run performance command uses this same enriched payload.
How It Works
Section titled “How It Works”The proxy authenticates to the Forgejo web UI using an admin session cookie. When a request comes in:
- The user token is validated against Forgejo’s standard API to confirm read access to the repo
- The proxy uses its admin session to fetch the run page or log file from the web UI
- The scraped data is normalized and returned as JSON (or plain text for logs)
- For jobs, the proxy reads the job-attempt page payload to attach per-step status and duration data