-
Notifications
You must be signed in to change notification settings - Fork 6
executable file
·58 lines (55 loc) · 2.43 KB
/
mirror-to-organization.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Mirroring
on: [push, delete]
jobs:
mirror_to_gitlab:
runs-on: ubuntu-latest
steps: # <-- must use actions/checkout before mirroring!
- uses: actions/checkout@v3
with:
lfs: 'true'
- name: checkoutLFS
uses: actions/checkout@v2 # <-- Do checkout of LFS elements
- run: git lfs fetch --all
- run: git lfs pull
- run: git lfs pull origin
- run: git fetch --unshallow
- run: mkdir -p ~/.ssh
- run: touch ~/.ssh/config
- run: echo 'Host *' | tee -a ~/.ssh/config
- run: echo 'ServerAliveInterval 30' | tee -a ~/.ssh/config
- run: echo 'ServerAliveCountMax 1200' | tee -a ~/.ssh/config
- run: echo 'TCPKeepAlive yes' | tee -a ~/.ssh/config
- run: git lfs fetch --all
- run: git lfs pull
- uses: pixta-dev/repository-mirroring-action@v1
with:
target_repo_url:
[email protected]:AleixMT/Linux-Auto-Customizer.git
ssh_private_key: # <-- use 'secrets' to pass credential information.
${{ secrets.GITLAB_SSH_PRIVATE_KEY }}
mirror_to_organization:
runs-on: ubuntu-latest
steps: # <-- must use actions/checkout before mirroring!
- uses: actions/checkout@v3
with:
lfs: 'true'
- name: checkoutLFS
uses: actions/checkout@v2 # <-- Do checkout of LFS elements
- run: git lfs fetch --all
- run: git lfs pull
- run: git lfs pull origin
- run: git fetch --unshallow
- run: mkdir -p ~/.ssh
- run: touch ~/.ssh/config
- run: echo 'Host *' | tee -a ~/.ssh/config
- run: echo 'ServerAliveInterval 30' | tee -a ~/.ssh/config
- run: echo 'ServerAliveCountMax 1200' | tee -a ~/.ssh/config
- run: echo 'TCPKeepAlive yes' | tee -a ~/.ssh/config
- run: git lfs fetch --all
- run: git lfs pull
- uses: pixta-dev/repository-mirroring-action@v1
with:
target_repo_url:
[email protected]:Gua-tk/Linux-Auto-Customizer.git
ssh_private_key: # <-- use 'secrets' to pass credential information.
${{ secrets.GITLAB_SSH_PRIVATE_KEY }} # <-- the corresponding public key is also stored in github, not only gitlab, so they can use the same private token