Skip to content

Merge pull request #167 from AleixMT/148_git_lfs_customizer #173

Merge pull request #167 from AleixMT/148_git_lfs_customizer

Merge pull request #167 from AleixMT/148_git_lfs_customizer #173

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:
git@gitlab.com: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:
git@github.com: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