We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e1e9d82 commit 5a4c602Copy full SHA for 5a4c602
1 file changed
.github/workflows/sync-to-gitlab.yml
@@ -25,5 +25,17 @@ jobs:
25
GITLAB_REPO: ${{ secrets.GITLAB_REPO }}
26
run: |
27
git remote remove gitlab 2>/dev/null || true
28
- git remote add gitlab "${GITLAB_REPO}"
29
- git push --mirror "https://oauth2:${GITLAB_TOKEN}@${GITLAB_REPO#https://}"
+
+ # GitLab縺ョ隱崎ィシURL繧剃ス懈・
30
+ AUTH_URL="https://oauth2:${GITLAB_TOKEN}@${GITLAB_REPO#https://}"
31
32
+ # 蜈ィ縺ヲ縺ョ繝ェ繝「繝シ繝郁ソス霍。繝悶Λ繝ウ繝√r繝ュ繝シ繧ォ繝ォ繝悶Λ繝ウ繝√↓縺吶k・・rigin/xxx -> xxx・・
33
+ # 窶サ縺薙l縺ォ繧医jrefs/remotes/origin/* 縺碁∽ソ。諡貞凄縺輔l繧九お繝ゥ繝シ繧貞屓驕ソ
34
+ git branch -r | grep -v '\->' | while read remote; do
35
+ branch="${remote#origin/}"
36
+ git branch -f "$branch" "$remote" 2>/dev/null || true
37
+ done
38
39
+ # 蜈ィ繝悶Λ繝ウ繝√→繧ソ繧ー繧貞シキ蛻カ繝励ャ繧キ繝・
40
+ git push --all --force "$AUTH_URL"
41
+ git push --tags --force "$AUTH_URL"
0 commit comments