mirror of
https://github.com/dexoron/dcr.git
synced 2026-10-21 11:48:36 +00:00
fix git sync
This commit is contained in:
7
.github/workflows/code-mirror.yml
vendored
7
.github/workflows/code-mirror.yml
vendored
@@ -32,6 +32,7 @@ jobs:
|
||||
test -n "$GITVERSE_PAT" || { echo 'GITVERSE_PAT is not configured' >&2; exit 1; }
|
||||
remote="https://oauth2:${GITVERSE_PAT}@gitverse.ru/${GITVERSE_ORG}/${GITVERSE_REPO}.git"
|
||||
git remote add gitverse "$remote"
|
||||
# Populate local refs first, so a manual run mirrors every branch too.
|
||||
git fetch origin '+refs/heads/*:refs/heads/*'
|
||||
git push --prune --force gitverse 'refs/heads/*:refs/heads/*'
|
||||
# Use a private ref namespace: Git will not overwrite the checked-out
|
||||
# branch, and broken legacy submodule metadata is not traversed.
|
||||
git fetch --no-recurse-submodules origin '+refs/heads/*:refs/mirror/*'
|
||||
git push --prune --force gitverse 'refs/mirror/*:refs/heads/*'
|
||||
|
||||
Reference in New Issue
Block a user