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 }} # --all + --tags scopes the push to refs/heads/* and refs/tags/*, # avoiding refs/pull/* (which GitHub refuses with "deny updating a # hidden ref"). --prune makes deletions on the Gitea side propagate. git push github --all --prune --force git push github --tags --prune --force