# Git Hosting Topology

Primary host:

- Forgejo (`origin`, `git.every.channel`)

Mirrors (push-only):

- Codeberg (`mirror-codeberg`)
- GitHub (`mirror-github`)

Codeberg and GitHub are distribution mirrors only. CI/actions should run on Forgejo primary.

## Configure local remotes

```sh
./scripts/git-configure-hosting.sh
```

Defaults:

- `origin`: `ssh://forgejo@git.every.channel:2222/every-channel/every.channel.git`
- `mirror-codeberg`: `git@codeberg.org:every-channel/every.channel.git`
- `mirror-github`: `git@github.com:every-channel/every.channel.git`

You can override via env vars:

- `EVERY_CHANNEL_PRIMARY_GIT_URL`
- `EVERY_CHANNEL_CODEBERG_GIT_URL`
- `EVERY_CHANNEL_GITHUB_GIT_URL`

## Push mirrors

```sh
./scripts/git-push-mirrors.sh
```

## Disable actions on Codeberg mirror

```sh
EVERY_CHANNEL_FORGE_HOST=https://codeberg.org \
EVERY_CHANNEL_FORGE_REPO=every-channel/every.channel \
EVERY_CHANNEL_FORGE_ACTIONS_ENABLED=false \
./scripts/forge-set-repo-actions.sh
```
