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.
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'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 normalised and returned as JSON (or plain text for logs)