ci: build on GitHub via the mirror, switchable with BUILD_ON #7

Merged
jcoffey-dev merged 1 commits from ci/build-on-github into main 2026-09-30 06:52:47 +00:00
Owner

Gitea stays the source of truth and push-mirrors every commit and tag to the GitHub replica. This lets GitHub Actions do the heavy building (native amd64 and arm64 runners) while Gitea keeps releases, announcements and gating.

The switch is the organization variable BUILD_ON, set on both forges:

  • BUILD_ON=github: .github/workflows/ci.yml runs on GitHub, publishes to the Gitea registry/releases as before, and posts a github/ci (branch|tag) commit status back. Gitea's build jobs skip; a new github job waits for that status, so this repository's Gitea checks still pass or fail with the real result.
  • BUILD_ON unset: nothing changes. GitHub's jobs skip and Gitea builds exactly as today. This is also the fallback if GitHub is unavailable.

Merging this is inert until the variable is set.

GitHub-era workflows that would misbehave once mirrored (scheduled releases, GHCR publishing and pruning) are removed, as is any dependabot.yml: every mirror sync deletes branches that exist only on GitHub, so its pull requests could never land.

GitHub organization settings this needs: variables BUILD_ON, REGISTRY, GITEA_URL; secret GITEA_TOKEN (write:repository + write:package); the three pinned docker/* actions allowed.

Gitea stays the source of truth and push-mirrors every commit and tag to the GitHub replica. This lets GitHub Actions do the heavy building (native amd64 and arm64 runners) while Gitea keeps releases, announcements and gating. **The switch** is the organization variable `BUILD_ON`, set on both forges: - `BUILD_ON=github`: `.github/workflows/ci.yml` runs on GitHub, publishes to the Gitea registry/releases as before, and posts a `github/ci (branch|tag)` commit status back. Gitea's build jobs skip; a new `github` job waits for that status, so this repository's Gitea checks still pass or fail with the real result. - `BUILD_ON` unset: nothing changes. GitHub's jobs skip and Gitea builds exactly as today. This is also the fallback if GitHub is unavailable. Merging this is inert until the variable is set. GitHub-era workflows that would misbehave once mirrored (scheduled releases, GHCR publishing and pruning) are removed, as is any `dependabot.yml`: every mirror sync deletes branches that exist only on GitHub, so its pull requests could never land. GitHub organization settings this needs: variables `BUILD_ON`, `REGISTRY`, `GITEA_URL`; secret `GITEA_TOKEN` (write:repository + write:package); the three pinned `docker/*` actions allowed.
jcoffey-dev added 1 commit 2026-09-30 06:18:09 +00:00
ci: build on GitHub when BUILD_ON=github
ci / github (pull_request) Skipped
ci / test (pull_request) Successful in 58s
ci / release (pull_request) Skipped
ci / announce (pull_request) Skipped
348eb0ea28
GitHub now holds a push mirror of this repository. The org variable
BUILD_ON picks which forge builds: set to 'github', the test and release
jobs run in .github/workflows/ci.yml on GitHub's runners, attach the
archives to the Gitea Release, and report back as the commit status
"github/ci (branch)" or "github/ci (tag)". Gitea's ci.yml skips its own
test and release jobs and waits on that status instead, so its run still
passes or fails with the real result, and it announces the release once
GitHub reports success. Unset, nothing changes: Gitea builds as before.

The GitHub-era release workflow is replaced by ci.yml.
The end-to-end test moves into ci.yml as a job run by hand: GitHub's
runners are the throwaway VMs it needs, and its weekly schedule is dropped
because schedules belong to Gitea.
jcoffey-dev merged commit 159fd392e6 into main 2026-09-30 06:52:47 +00:00
jcoffey-dev deleted branch ci/build-on-github 2026-09-30 06:52:47 +00:00
Sign in to join this conversation.