From 683dffcdb415f1b1fa2b174e743f1de7ae84477e Mon Sep 17 00:00:00 2001 From: Gioacchino Mazzurco Date: Sun, 14 Jun 2026 14:37:31 +0200 Subject: [PATCH] Add github workflow to automatically sync to gitlab.com repo --- .github/workflows/mirror-to-gitlab.yml | 30 ++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/mirror-to-gitlab.yml diff --git a/.github/workflows/mirror-to-gitlab.yml b/.github/workflows/mirror-to-gitlab.yml new file mode 100644 index 0000000..6c24196 --- /dev/null +++ b/.github/workflows/mirror-to-gitlab.yml @@ -0,0 +1,30 @@ +name: Mirror to GitLab + +on: + push: + branches: + - '**' + tags: + - '**' + workflow_dispatch: + +jobs: + mirror: + runs-on: ubuntu-latest + + steps: + - name: Install GitLab deploy key + uses: webfactory/ssh-agent@v0.9.0 + with: + ssh-private-key: ${{ secrets.RETROSHARE_GITLAB_MIRROR_SSH_KEY }} + + - name: Trust GitLab host key + run: | + ssh-keyscan gitlab.com >> ~/.ssh/known_hosts + + - name: Mirror repository to GitLab + run: | + git clone --mirror "https://github.com/${GITHUB_REPOSITORY}.git" repo.git + cd repo.git + git remote set-url --push origin git@gitlab.com:RetroShare/RetroShareWebUI.git + git push --mirror