mirror/github-mirror.sh publishes main and its tags to a read-only GitHub mirror, adding a notice under the README title, with a systemd timer to run it hourly. A GitHub Actions workflow builds the images on the mirror and pushes them to ghcr.io. The docs point prebuilt images there, and CONTRIBUTING no longer invites issues and pull requests. upstream-status.sh now fetches without tags, so upstream's version tags stay out of local clones.
1.4 KiB
1.4 KiB
GitHub mirror
Dotcom Arcade is developed on a private forge. mirror/github-mirror.sh
publishes its main and the tags on main to
github.com/branderson/dotcom-arcade,
hourly, from a host that can push to GitHub. Issues and pull requests are off
there. Actions stays on, since it builds the images that ghcr.io/branderson/
serves (see publishing images).
The mirror's main is the forge's plus one commit, which adds a read-only notice
under the README's title. Every forge commit is in the mirror unchanged, and
each sync fast-forwards. If the README loses its # title, the sync stops
instead of publishing without the notice.
Setup
- Set up the timer as described at the top of
mirror/dotcom-arcade-github-mirror.service. Give it a deploy key with write access to the GitHub repository. - Run
github-mirror.sh --dry-runto build what a sync would publish without pushing it. - Once the first sync has pushed, run
github-mirror.sh --settings(needsgh). It turns off issues, pull requests, projects, wiki and discussions. - The first image build creates its packages as private. In each package's settings on GitHub, set its visibility to public.
The timer runs a copy of the script, not the checkout's. Reinstall it after
reviewing a change to mirror/.