From 35babb12ed248f94ccbb4faf882ffecb6b023f40 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 11 May 2020 22:26:36 +0100 Subject: [PATCH] Create git-sync.yml --- .github/workflows/git-sync.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/git-sync.yml diff --git a/.github/workflows/git-sync.yml b/.github/workflows/git-sync.yml new file mode 100644 index 0000000..0b4d619 --- /dev/null +++ b/.github/workflows/git-sync.yml @@ -0,0 +1,22 @@ +name: Github to Bitbucket sync +# This action will sync the github repo with a backup bitbucket repo. +# This will allow LinuxGSM to use Bitbucket as and alternative download if github fails. +on: push +jobs: + repo-sync: + runs-on: ubuntu-latest + steps: + - name: ssh + uses: webfactory/ssh-agent@v0.2.0 + with: + ssh-private-key: ${{ secrets.BITBUCKET_SECRET }} + ssh_private_key: ${{ secrets.BITBUCKET_SECRET }} + + - name: repo-sync + uses: wei/git-sync@v2 + with: + source_repo: "https://github.com/GameServerManagers/Game-Server-Configs" + source_branch: "refs/heads/*" + destination_repo: "git@bitbucket.org:GameServerManagers/Game-Server-Configs.git" + destination_branch: "refs/heads/*" + ssh_private_key: ${{ secrets.BITBUCKET_SECRET }}