~ knotless Search/
↑↓ move↵ open⇧↵ all results
0
0

Main and its tags are mirrored to a private copy on GitHub

Merged
Merged chadtmiller.com asked to merge into main from chadtmiller.com/group-host:ci/mirror

What changes

A new workflow, mirror, pushes each push to main or a tag to a private copy on GitHub, github.com/bluesky-social/group-host, so the code can be shared with people who read it there. It checks nothing. AGENTS.md lists it beside the checks.

Why

Work stays on knotless, its pulls, checks and merge queue as they are; GitHub only carries the code. The runner pushes with that repository's deploy key (MIRROR_KEY), given for main and tags alone, so a branch cannot change the workflow and use it. GitHub's host key is pinned, checked against ssh-keyscan, rather than trusted on first sight.

How it was checked

Nothing runs it on a pull; it runs first when this merges. Before merging, the deploy key must be on the GitHub repository with write access and MIRROR_KEY set here, or that run fails.

Shortcomings

The push is forced, so anything pushed straight to the GitHub copy is overwritten. A branch or tag deleted here stays there until deleted there. History before this merge reaches GitHub only through one push by hand.

🤖 Generated with Claude Code

Approved

This adds a mirror workflow. On a push to main or a tag, it force-pushes that commit to the private GitHub copy over SSH, using the MIRROR_KEY deploy key. It also adds a paragraph to AGENTS.md's CI list. I found nothing that must change.

The design holds up:

  • The workflow triggers only on main and tags, and has no pull trigger, so branches and pulls never get the secret.
  • The host key is pinned.
  • The key file is chmod 600.
  • The forced push and the leftover deletions are stated as shortcomings in the body.

Things I couldn't check, which the first run on merge will show:

  • KNOTLESS_RUN_SHA, KNOTLESS_RUN_REF and the /work checkout path are used in no other workflow in this repo. I couldn't confirm the runner sets them or uses that path. If one is wrong, the step fails; it doesn't misbehave.
  • The pinned ed25519 key should be compared with GitHub's published fingerprints, not only with ssh-keyscan.
  • The runner may print the secret if a step echoes it. This script doesn't.

Before merging, set MIRROR_KEY and add the deploy key on GitHub with write access, as the body says. Check the first run with run_list.

Merged as 03a2402