We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ea7b413 commit 3def294Copy full SHA for 3def294
1 file changed
.github/workflows/mirror-to-gitlab.yml
@@ -18,11 +18,11 @@ jobs:
18
persist-credentials: false
19
20
- name: Mirror to GitLab
21
- continue-on-error: true
22
run: |
23
git remote add gitlab "https://oauth2:${GITLAB_TOKEN}@${GITLAB_HOST}/${GITLAB_REPO}.git"
24
# Avoid --mirror, which also pushes refs/remotes/* that GitLab rejects as hidden refs.
25
- git push --prune gitlab 'refs/heads/*:refs/heads/*'
+ # Push from refs/remotes/origin/* so all branches are present and --prune never deletes the default branch.
+ git push --prune gitlab 'refs/remotes/origin/*:refs/heads/*'
26
git push --prune gitlab 'refs/tags/*:refs/tags/*'
27
env:
28
GITLAB_TOKEN: ${{ secrets.GITLAB_MIRROR_TOKEN }}
0 commit comments