Skip to content

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.

MethodEndpointDescription
GET/api/v1/repos/{owner}/{repo}/actions/runs/latestGet info about the latest run
GET/api/v1/repos/{owner}/{repo}/actions/runs/latest/logsDownload logs for the latest run
GET/api/v1/repos/{owner}/{repo}/actions/runs/latest/jobsList jobs in the latest run
GET/api/v1/repos/{owner}/{repo}/actions/runs/latest/summarySummary of the latest run
POST/api/v1/repos/{owner}/{repo}/actions/runs/latest/rerunTrigger a rerun of the latest run
MethodEndpointDescription
GET/api/v1/repos/{owner}/{repo}/actions/runs/{run_number}/logsDownload logs for a specific run
GET/api/v1/repos/{owner}/{repo}/actions/runs/{run_number}/jobsList jobs in a specific run
GET/api/v1/repos/{owner}/{repo}/actions/runs/{run_number}/summarySummary of a specific run
POST/api/v1/repos/{owner}/{repo}/actions/runs/{run_number}/rerunTrigger a rerun of a specific run
ParameterDescription
ownerRepository owner (user or organisation name)
repoRepository name
run_numberThe sequential run counter visible in the Forgejo web UI URL (e.g., /actions/runs/42)
ParameterTypeDescription
jobinteger0-based job index within the run (default: 0)
attemptinteger1-based attempt number for the job (default: 1)
workflow_idstringFilter runs by workflow file name (e.g., ci.yml)
Terminal window
# Download logs for the latest run
curl -H 'Authorization: token YOUR_TOKEN' \
'https://forgejo-proxy.hochguertel.work/api/v1/repos/myorg/myrepo/actions/runs/latest/logs'
# Download logs for run #42, second job
curl -H 'Authorization: token YOUR_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 workflow
curl -H 'Authorization: token YOUR_TOKEN' \
'https://forgejo-proxy.hochguertel.work/api/v1/repos/myorg/myrepo/actions/runs/latest/jobs?workflow_id=ci.yml'
# Rerun the latest failed run
curl -X POST -H 'Authorization: token YOUR_TOKEN' \
'https://forgejo-proxy.hochguertel.work/api/v1/repos/myorg/myrepo/actions/runs/latest/rerun'

The proxy authenticates to the Forgejo web UI using an admin session cookie. When a request comes in:

  1. The user token is validated against Forgejo’s standard API to confirm read access to the repo
  2. The proxy uses its admin session to fetch the run page or log file from the web UI
  3. The scraped data is normalised and returned as JSON (or plain text for logs)