Fix GitLab mirror failing on GitHub PR refs

The mirror workflow cloned with --mirror and pushed all refs, including
GitHub's refs/pull/* and upstream/pr/*, which GitLab rejects as hidden
refs ("deny updating a hidden ref" on upstream/pr/3213), failing the
whole push. Clone --bare and push only refs/heads/* and refs/tags/*
with --prune, keeping deletion sync while never touching PR refs.
This commit is contained in:
Gioacchino Mazzurco 2026-07-23 18:10:46 +02:00
parent 76ba160ad1
commit 086184ad21
No known key found for this signature in database
GPG Key ID: A1FBCA3872E87051

View File

@ -24,7 +24,7 @@ jobs:
- name: Mirror repository to GitLab
run: |
git clone --mirror "https://github.com/${GITHUB_REPOSITORY}.git" repo.git
git clone --bare "https://github.com/${GITHUB_REPOSITORY}.git" repo.git
cd repo.git
git remote set-url --push origin git@gitlab.com:RetroShare/RetroShare.git
git push --mirror
git push --prune origin 'refs/heads/*:refs/heads/*' 'refs/tags/*:refs/tags/*'