2021-02-08 14:55:43 +00:00
|
|
|
name: Mirror Gitlab repo
|
|
|
|
|
|
|
|
# Every hour
|
|
|
|
on:
|
|
|
|
schedule:
|
|
|
|
- cron: "0 * * * *"
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
mirror-gitlab-repo:
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
|
|
|
|
steps:
|
2021-12-28 21:11:58 +00:00
|
|
|
- name: Install git-lfs 2.0
|
|
|
|
run: wget https://github.com/git-lfs/git-lfs/releases/download/v2.13.3/git-lfs-linux-amd64-v2.13.3.tar.gz;
|
|
|
|
tar xzf git-lfs-linux-amd64-v2.13.3.tar.gz;
|
|
|
|
|
|
|
|
- name: Install LFS
|
|
|
|
run: ./git-lfs install;
|
|
|
|
|
2021-02-08 14:55:43 +00:00
|
|
|
- name: Clone Gitlab repo
|
2021-12-28 21:11:58 +00:00
|
|
|
run: git clone https://gitlab.com/veloren/veloren.git;
|
2021-02-08 14:55:43 +00:00
|
|
|
|
|
|
|
- name: Uninstall LFS
|
|
|
|
run: cd veloren;
|
2021-12-28 21:11:58 +00:00
|
|
|
../git-lfs uninstall;
|
|
|
|
|
|
|
|
- name: Migrate LFS
|
|
|
|
run: cd veloren;
|
|
|
|
../git-lfs migrate export --verbose --include="*" --everything --skip-fetch --yes 2>&1;
|
2021-02-08 14:55:43 +00:00
|
|
|
|
|
|
|
- name: Push changes
|
|
|
|
uses: ad-m/github-push-action@master
|
|
|
|
with:
|
|
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
branch: master
|
|
|
|
force: true
|
|
|
|
tags: true
|
|
|
|
directory: veloren
|