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

Merged
jcoffey-dev merged 1 commits from ci/build-on-github into main 2026-09-30 06:51:56 +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:17 +00:00
ci: build on GitHub from the Gitea push mirror, switched by BUILD_ON
ci / go-vulncheck (hack/windows-fixture) (pull_request) Successful in 1m6s
ci / go-vulncheck (alerting) (pull_request) Successful in 41s
ci / go-vulncheck (proto) (pull_request) Successful in 1m1s
ci / npm-audit (pull_request) Successful in 57s
ci / tenant-boundary (pull_request) Successful in 9s
ci / conformance-corpus (pull_request) Successful in 29s
ci / go-vulncheck (api) (pull_request) Successful in 43s
ci / rust-advisories (search) (pull_request) Successful in 2m35s
ci / go-vulncheck (deploy/operator) (pull_request) Successful in 36s
ci / web-routes (pull_request) Successful in 9s
ci / go-vulncheck (hack/benchmark-fixture) (pull_request) Successful in 31s
ci / go-vulncheck (enterprise) (pull_request) Successful in 57s
ci / go-vulncheck (terraform) (pull_request) Successful in 34s
ci / go-licenses (alerting) (pull_request) Successful in 1m27s
ci / rust-licenses (agent) (pull_request) Successful in 2m36s
ci / rust-licenses (search) (pull_request) Successful in 2m33s
ci / go-licenses (deploy/operator) (pull_request) Successful in 1m8s
ci / go-licenses (api) (pull_request) Successful in 1m25s
ci / go-licenses (hack/windows-fixture) (pull_request) Successful in 47s
ci / github (pull_request) Skipped
ci / go-licenses (hack/benchmark-fixture) (pull_request) Successful in 1m15s
ci / go-licenses (enterprise) (pull_request) Successful in 1m17s
ci / npm-licenses (pull_request) Successful in 1m24s
ci / go-licenses (ingest) (pull_request) Successful in 1m25s
ci / go-licenses (terraform) (pull_request) Successful in 1m24s
ci / go-licenses (proto) (pull_request) Successful in 1m24s
ci / rust-advisories (agent) (pull_request) Successful in 2m17s
ci / go-vulncheck (ingest) (pull_request) Successful in 1m1s
e80b6d48ce
Gitea stays the source of truth and push-mirrors this repository to
GitHub. With the org variable BUILD_ON=github (set on both forges), the
jobs in .gitea/workflows/ci.yml skip and .github/workflows/ci.yml does
the same work on GitHub Actions, then reports one commit status back to
Gitea ("github/ci (branch)" or "github/ci (tag)"). A new `github` job in
the Gitea workflow waits for that status and passes or fails with it, so
the Gitea run still carries the real result.

With BUILD_ON unset nothing changes: every GitHub job skips and Gitea
builds as before. That is also the fallback if GitHub is unavailable.

The GitHub-era workflows are replaced by the single ci.yml, which mirrors
the Gitea one job for job. Everything it uses is pinned to a full SHA.

.github/dependabot.yml is removed: Dependabot would open its pull
requests on the GitHub replica, where every mirror sync prunes the
branches it pushes.
jcoffey-dev merged commit 45154663c5 into main 2026-09-30 06:51:56 +00:00
jcoffey-dev deleted branch ci/build-on-github 2026-09-30 06:51:58 +00:00
Sign in to join this conversation.