- Shell 100%
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.
|
||
|---|---|---|
| .forgejo/workflows | ||
| patches | ||
| .gitignore | ||
| build.sh | ||
| README.md | ||
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}/logsGET /api/v1/repos/{owner}/{repo}/actions/runs/{run_id}/logsGET /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 thev15.0.3tag (git format-patchoutput, applied withgit am):0001-...-11915.patch—GET /actions/runs/{id}/jobs0002-...-12666.patch— job + run logs endpoints
build.sh— clones Forgejo atv15.0.3, applies the patches, builds a static linux/amd64 binary via the official Dockerfile (sqlite + bindata), and emitsout/forgejo-<ver>-linux-amd64plus 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:
- 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 bumpforgejo_version+ checksum innetzhansa-infra. - A release that includes the logs API (grep its
routers/api/v1/api.gofor{run_id}/logs): delete this backport. Point thenetzhansa-infraforgejorole 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