Today's cleanup surfaced 14 branches that existed on GitHub but had been deleted on Gitea — the previous `--all --force` + `--tags --force` pair pushes refs but never deletes missing ones, so the mirror drifted over time. Switching to `git push --mirror` (equivalent to --all --tags --prune --force) makes the GitHub side a true reflection of Gitea: branch and tag deletes propagate automatically. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
18 lines
454 B
YAML
18 lines
454 B
YAML
name: Mirror to GitHub
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- '**'
|
|
|
|
jobs:
|
|
mirror:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Push to GitHub
|
|
run: |
|
|
cd /tmp
|
|
git clone --mirror https://gitea.resolutionflow.com/chihlasm/resolutionflow.git repo
|
|
cd repo
|
|
git remote add github https://x-access-token:${{ secrets.GH_MIRROR_TOKEN }}@github.com/${{ secrets.GH_MIRROR_REPO }}
|
|
git push github --mirror |