Skip to content

Latest commit

 

History

History
31 lines (23 loc) · 1.2 KB

README.md

File metadata and controls

31 lines (23 loc) · 1.2 KB

GitHub Mirror

mirror License

Mirrors repositories to GitHub.

Note: Action runs on branches other than main execute a dry run and wont update the remote repository.

Add Mirror

⚠️ All branches which aren't in the upstream repository are lost.

  1. Create a fork (if on GitHub) or an empty destination repository, same name as upstream is recommended
  2. Generate SSH keys: ssh-keygen -t ed25519 -C github-mirror
    • Add the private key as a new secret to this project (SSH_PRIVATE_KEY_<Repo ID>, all uppercase)
    • Add the public key as writeable deployment key github-mirror to the destination repository
  3. Add configuration to mirror.yml
  4. (Optional) Set default branch of the destination repository according to upstream

Example

mirror_config:
    - {
        src_repo: "<Upstream Git URL>",
        dest_repo: "<Destination Repo Name>",
        key_id: "<Repo ID>",
    }
    - ...