Skip to content

Commit d896c5c

Browse files
committed
Added github action to mirror content to private KU Leuven Gitlab
1 parent 5623605 commit d896c5c

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Mirror to GitLab via SSH
2+
3+
on:
4+
push:
5+
branches:
6+
- '**' # trigger on all branches
7+
8+
jobs:
9+
mirror:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout source
13+
uses: actions/checkout@v4
14+
with:
15+
fetch-depth: 0 # important to push all branches/tags
16+
17+
- name: Setup SSH
18+
run: |
19+
mkdir -p ~/.ssh
20+
echo "${{ secrets.GITLAB_ORGANIZATION_SSH_PRIVATE_KEY }}" > ~/.ssh/id_ed25519
21+
chmod 600 ~/.ssh/id_ed25519
22+
ssh-keyscan gitlab.kuleuven.be >> ~/.ssh/known_hosts
23+
24+
- name: Push to GitLab
25+
run: |
26+
git config --global user.email "ci@example.com"
27+
git config --global user.name "GitHub CI Mirror"
28+
git remote add gitlab git@gitlab.kuleuven.be:rob-expressiongraphs/ros2/crospi_github_mirror/dummy_lib.git
29+
git push --all gitlab
30+
git push --tags gitlab

0 commit comments

Comments
 (0)