From 2dcfea563885a23a308064fbff178f735ba32f42 Mon Sep 17 00:00:00 2001 From: Forest Anderson Date: Mon, 8 Feb 2021 09:55:43 -0500 Subject: [PATCH] Added Action that will mirror the Gitlab repo to Github --- .github/workflows/mirror.yml | 37 ++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/mirror.yml diff --git a/.github/workflows/mirror.yml b/.github/workflows/mirror.yml new file mode 100644 index 0000000000..f870886d72 --- /dev/null +++ b/.github/workflows/mirror.yml @@ -0,0 +1,37 @@ +name: Mirror Gitlab repo + +# Every hour +on: + schedule: + - cron: "0 * * * *" + +jobs: + mirror-gitlab-repo: + runs-on: ubuntu-20.04 + + steps: + - name: Install git-filter-repo + run: git clone https://github.com/newren/git-filter-repo.git; + ./git-filter-repo/git-filter-repo --help + + - name: Clone Gitlab repo + run: git lfs install; + git clone https://gitlab.com/veloren/veloren.git; + + - name: Uninstall LFS + run: cd veloren; + git lfs uninstall; + git lfs migrate export --include="*" --everything; + + - name: Remove workflow files + run: cd veloren; + ../git-filter-repo/git-filter-repo --invert-paths --path .github --force; + + - name: Push changes + uses: ad-m/github-push-action@master + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + branch: master + force: true + tags: true + directory: veloren \ No newline at end of file