git-sync.yml 895 B

1234567891011121314151617181920212223242526272829
  1. name: Github to Bitbucket Sync
  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. permissions: {}
  10. jobs:
  11. gitHub-to-bitbucket:
  12. if: github.repository_owner == 'GameServerManagers'
  13. runs-on: ubuntu-latest
  14. steps:
  15. - name: SSH Agent
  16. uses: webfactory/ssh-agent@v0.9.0
  17. with:
  18. ssh-private-key: ${{ secrets.BITBUCKET_SECRET }}
  19. - name: Git Sync
  20. uses: wei/git-sync@v3.0.0
  21. with:
  22. ssh_private_key: ${{ secrets.BITBUCKET_SECRET }}
  23. source_repo: "https://github.com/GameServerManagers/LinuxGSM"
  24. source_branch: "refs/heads/*"
  25. destination_repo: "git@bitbucket.org:GameServerManagers/linuxgsm.git"
  26. destination_branch: "refs/heads/*"