git-sync.yml 858 B

123456789101112131415161718192021222324252627
  1. name: Backup Repo
  2. # This action will sync the github repo with a backup bitbucket repo.
  3. # This will allow LinuxGSM to use Bitbucket as and alternative download if github fails.
  4. on:
  5. push:
  6. branches:
  7. - master
  8. - 'develop'
  9. - 'feature/update-lgsm'
  10. jobs:
  11. repo-sync:
  12. runs-on: ubuntu-latest
  13. steps:
  14. - name: ssh
  15. uses: webfactory/ssh-agent@v0.2.0
  16. with:
  17. ssh-private-key: ${{ secrets.BITBUCKET_SECRET }}
  18. ssh_private_key: ${{ secrets.BITBUCKET_SECRET }}
  19. - name: repo-sync
  20. uses: wei/git-sync@v2
  21. with:
  22. source_repo: "https://github.com/GameServerManagers/LinuxGSM"
  23. source_branch: "refs/heads/*"
  24. destination_repo: "git@bitbucket.org:GameServerManagers/linuxgsm.git"
  25. destination_branch: "refs/heads/*"
  26. ssh_private_key: ${{ secrets.BITBUCKET_SECRET }}