Skip to content

Commit 3def294

Browse files
committed
pushing remotes/origin
1 parent ea7b413 commit 3def294

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

.github/workflows/mirror-to-gitlab.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ jobs:
1818
persist-credentials: false
1919

2020
- name: Mirror to GitLab
21-
continue-on-error: true
2221
run: |
2322
git remote add gitlab "https://oauth2:${GITLAB_TOKEN}@${GITLAB_HOST}/${GITLAB_REPO}.git"
2423
# Avoid --mirror, which also pushes refs/remotes/* that GitLab rejects as hidden refs.
25-
git push --prune gitlab 'refs/heads/*:refs/heads/*'
24+
# Push from refs/remotes/origin/* so all branches are present and --prune never deletes the default branch.
25+
git push --prune gitlab 'refs/remotes/origin/*:refs/heads/*'
2626
git push --prune gitlab 'refs/tags/*:refs/tags/*'
2727
env:
2828
GITLAB_TOKEN: ${{ secrets.GITLAB_MIRROR_TOKEN }}

0 commit comments

Comments
 (0)