Skip to content

Commit

Permalink
Update GitLab sync workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
zelhajou committed Jan 31, 2025
1 parent 0891645 commit 9bc7572
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/sync-to-gitlab.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,5 +106,11 @@ jobs:
git fetch gitlab || true
echo "Pushing to GitLab..."
# Push all refs without '--mirror' to avoid hidden ref issues
git push -f gitlab refs/remotes/origin/*:refs/heads/* refs/tags/*:refs/tags/*
# Push all branches except HEAD ref
for branch in $(git branch -r | grep 'origin/' | grep -v 'origin/HEAD'); do
branch_name=${branch#origin/}
git push -f gitlab "$branch:refs/heads/$branch_name"
done
# Push all tags
git push -f gitlab refs/tags/*:refs/tags/*

0 comments on commit 9bc7572

Please sign in to comment.