mirror of
https://github.com/RetroShare/BitDHT.git
synced 2026-09-12 19:50:02 +05:00
Add github workflow to automatically sync to gitlab.com repo
This commit is contained in:
parent
366ac44123
commit
0412d366ad
30
.github/workflows/mirror-to-gitlab.yml
vendored
Normal file
30
.github/workflows/mirror-to-gitlab.yml
vendored
Normal file
@ -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/BitDHT.git
|
||||
git push --mirror
|
||||
Loading…
Reference in New Issue
Block a user