chore: migrate CI and metadata from GitHub to Forgejo #385
No reviewers
Labels
No labels
adr
automated
bug
chore
dependencies
documentation
enhancement
epic
github-actions
P1-high
P2-medium
P3-low
release
research
rust
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jwilger/eventcore!385
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "chore/forgejo-migration"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Switches the project's CI from GitHub Actions to Forgejo Actions and
removes all GitHub-only metadata after the migration to a self-hosted
Forgejo instance at git.johnwilger.com:2222/jwilger/eventcore.
Why Forgejo Actions needs more than a path rename: GitHub-specific
features (actions/github-script against the GitHub REST API, the
release-plz github backend, Dependabot, the ubuntu-latest runner label)
either don't exist on Forgejo or behave differently. The mutation auto-
issue step is reimplemented as a curl call to Forgejo's REST API, and
release-plz now targets the gitea backend (Forgejo is API-compatible).
CodeRabbit's hosted product does not support Forgejo, so the GitHub App
is replaced by a new workflow that runs the CodeRabbit CLI inside CI and
posts the review as a PR comment via the Forgejo API. This requires a
CODERABBIT_API_KEY repo secret.
The .github/ tree is removed entirely. Issue templates move to
.forgejo/issue_template/. Doc and rules files (CLAUDE.md, AGENTS.md,
.claude/rules/forgejo-issues.md formerly github-issues.md,
pr-review-feedback-protocol.md, release-plz.toml prose) are updated so
no stale GitHub references remain.
The default Postgres host port shifts from 5432 to 5433 (docker-compose,
test connection-string defaults, Forgejo CI service mapping). This lets
the test docker container coexist with a system PostgreSQL service that
many local environments already run on 5432. POSTGRES_PORT can still
override the default.
Operator action items (configure in the Forgejo admin UI, not part of
this commit): register a runner with the docker label; create repo
secrets CARGO_REGISTRY_TOKEN, RELEASE_PLZ_TOKEN, CODERABBIT_API_KEY;
reconfigure branch protection on main to require the gate job; recreate
the issue label set.
CI failure diagnosis — runner config, not workflow
Both workflow runs (
ci.ymlandcoderabbit.yml) failed at theactions/checkout@v6step with:The runner (
gregorv0.4.0) is registered withgitea_instance_url: http://localhost:3300. That URL works for the runner host → Forgejo, but inside the action container the runner spawns,localhostresolves to the container itself, not the Forgejo host — so checkout can't clone the repo.The same error cascaded to every job in
ci.yml(sincechangesfailed, the rest were marked failed/skipped) and tocoderabbit.yml(same checkout failure on its only job).Fix (on the runner host, not in this PR)
Edit the
act_runnerconfig (typically/etc/act_runner/config.yaml) and changegitea_instance_urlto a URL reachable from inside the action container. Options:http://<host-ip>:3300Then restart the runner (
systemctl restart act_runner, or howevergregoris supervised) and rerun the workflows from the Forgejo UI.Other operator items still pending (from PR description)
CARGO_REGISTRY_TOKEN,RELEASE_PLZ_TOKEN,CODERABBIT_API_KEYmainrequiring thegatejobNo workflow code changes are needed for the checkout failure — it will resolve once the runner config is corrected.
The CodeRabbit CLI runs `git diff main...HEAD` to compute file changes, which needs `main` resolvable as a local branch. actions/checkout@v6 only materializes the PR HEAD ref, so we explicitly fetch the base branch into a local ref of the same name before invoking the CLI. Without this, the review step failed with: Failed to get file changes: Command failed with exit code 128: git diff --name-status main...HEADThe env context (${{ env.X }}) only sees env vars set in workflow/job/step env: blocks — not runner-injected vars like GITHUB_SERVER_URL. SERVER was empty, producing a relative URL that curl rejected. Reference GITHUB_SERVER_URL and GITHUB_REPOSITORY directly in the shell, matching the pattern already used in ci.yml.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.