bread-ecosystem/scripts
Breadway ab4e882baa Add push-mirror provisioning + old mirror.yml cleanup scripts
Replaces the per-repo .forgejo/workflows/mirror.yml + MIRROR_TOKEN
pattern with Forgejo's native Push Mirror feature, provisioned
centrally instead of per-repo:

- setup-push-mirrors.sh: reads the repo list live from the Forgejo API
  (GET /users/Breadway/repos — confirmed Breadway is a user account,
  not an org, so the /orgs/ endpoint 404s and this falls back
  correctly) instead of a hardcoded repo list, checks each repo's
  existing push_mirrors for idempotency, and POSTs a new one
  (sync_on_commit + 8h interval) for any repo missing one. Private
  repos are skipped by default (found novacana-engine on the live
  account) since mirroring one to a public GitHub repo is a
  disclosure decision this script should never make silently — pass
  --include-private to override per-run. --dry-run prints every
  request (GH token redacted) without POSTing.

- cleanup-old-mirror-workflows.sh: deletes mirror.yml from each repo's
  default branch (live commit via the contents API, not a local
  change) and removes the MIRROR_TOKEN secret. Refuses to run at all
  — dry-run included — without an explicit
  --i-have-verified-push-mirrors-work flag, since it should only ever
  run after confirming the new push mirrors are actually syncing.

Neither script has been run for real. setup-push-mirrors.sh has only
been run with --dry-run against the live Forgejo API (read-only GETs);
cleanup-old-mirror-workflows.sh has not been run at all beyond
confirming its guardrail refuses to execute.
2026-07-17 14:11:30 +08:00
..
cleanup-old-mirror-workflows.sh Add push-mirror provisioning + old mirror.yml cleanup scripts 2026-07-17 14:11:30 +08:00
doctor-channels.sh Move bakery's own release workflow from .github to .forgejo 2026-07-17 14:06:12 +08:00
gen-index.sh Fix audit findings: bakery index signing, artifact checksums, stale theme docs 2026-07-17 03:37:51 +08:00
get.sh Fix audit findings: bakery index signing, artifact checksums, stale theme docs 2026-07-17 03:37:51 +08:00
setup-push-mirrors.sh Add push-mirror provisioning + old mirror.yml cleanup scripts 2026-07-17 14:11:30 +08:00
test-gen-index.sh Fix audit findings: bakery index signing, artifact checksums, stale theme docs 2026-07-17 03:37:51 +08:00