Patched Forgejo build for code.netzhansa.com: v15.0.3 + unreleased Actions logs REST API (PRs #11915, #12666)
Find a file
Hans Hübner fcf9eddaaa bp2: add swagger regen patch; document the two log endpoints
Adds patch 0003 (regenerated swagger spec) so GET /actions/jobs/{job_id}/logs
and /actions/runs/{run_id}/logs appear in the served swagger. Bumps default
build version + README to v15.0.3-bp2.
2026-06-27 22:06:51 +02:00
.forgejo/workflows forgejo-patched: v15.0.3 + Actions logs REST API backport (#11915, #12666) 2026-06-27 21:35:22 +02:00
patches bp2: add swagger regen patch; document the two log endpoints 2026-06-27 22:06:51 +02:00
.gitignore forgejo-patched: v15.0.3 + Actions logs REST API backport (#11915, #12666) 2026-06-27 21:35:22 +02:00
build.sh bp2: add swagger regen patch; document the two log endpoints 2026-06-27 22:06:51 +02:00
README.md bp2: add swagger regen patch; document the two log endpoints 2026-06-27 22:06:51 +02:00

forgejo-patched

A patched build of Forgejo for code.netzhansa.com: the upstream v15.0.3 release plus the Actions job and run logs REST API, which is implemented upstream but not yet in any Forgejo release.

Why this exists

The CI-log REST endpoints

  • GET /api/v1/repos/{owner}/{repo}/actions/jobs/{job_id}/logs
  • GET /api/v1/repos/{owner}/{repo}/actions/runs/{run_id}/logs
  • GET /api/v1/repos/{owner}/{repo}/actions/runs/{run_id}/jobs

were merged to the Forgejo development branch (PRs #11915 and #12666) after v15.0.3 was cut. No released Forgejo (through 15.0.3) serves them, so reading CI logs over the API requires either the unreleased dev branch or this backport. The patch carries exactly those two PRs on top of the v15.0.3 tag.

Contents

  • patches/ — the two upstream commits, rebased onto and resolved against the v15.0.3 tag (git format-patch output, applied with git am):
    • 0001-...-11915.patchGET /actions/runs/{id}/jobs
    • 0002-...-12666.patch — job + run logs endpoints
  • build.sh — clones Forgejo at v15.0.3, applies the patches, builds a static linux/amd64 binary via the official Dockerfile (sqlite + bindata), and emits out/forgejo-<ver>-linux-amd64 plus its .sha256.

Build

./build.sh            # needs git + docker buildx

Then attach out/forgejo-15.0.3-bp2-linux-amd64 and its .sha256 to a release tagged v15.0.3-bp2. netzhansa-infra's forgejo role installs that asset by URL and verifies the sha256, so a stock release can never silently replace the patched build.

THIS PATCH IS TEMPORARY — drop conditions

Carry it only until the logs API ships in a Forgejo release. The watch-upstream workflow checks automatically and opens/updates a tracking issue. Manual triggers:

  1. A new patch release (e.g. v15.0.4) that still lacks the logs API: re-cut the patches onto the new tag and rebuild — FORGEJO_TAG=v15.0.4 BP_VERSION=15.0.4-bp1 ./build.sh, then publish a new release and bump forgejo_version + checksum in netzhansa-infra.
  2. A release that includes the logs API (grep its routers/api/v1/api.go for {run_id}/logs): delete this backport. Point the netzhansa-infra forgejo role back at the stock codeberg binary and drop the checksum override. The patch is no longer needed.

Upstream references

  • PR #11915 — feat: add /actions/runs/{id}/jobs
  • PR #12666 — feat(api): expose action job + run logs via REST