git-sync.yaml 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. name: git-sync-with-mirror
  2. on:
  3. push:
  4. branches: [ master ]
  5. workflow_dispatch:
  6. jobs:
  7. git-sync:
  8. runs-on: ubuntu-latest
  9. steps:
  10. - name: git-sync
  11. env:
  12. git_sync_source_repo: git@git.fridu.us:heckyel/cl.git
  13. git_sync_destination_repo: ssh://git@c.fridu.us/services/cl.git
  14. if: env.git_sync_source_repo && env.git_sync_destination_repo
  15. uses: astounds/git-sync@v1
  16. with:
  17. source_repo: git@git.fridu.us:heckyel/cl.git
  18. source_branch: "master"
  19. destination_repo: ssh://git@c.fridu.us/services/cl.git
  20. destination_branch: "master"
  21. source_ssh_private_key: ${{ secrets.GIT_SYNC_SOURCE_SSH_PRIVATE_KEY }}
  22. destination_ssh_private_key: ${{ secrets.GIT_SYNC_DESTINATION_SSH_PRIVATE_KEY }}
  23. - name: git-sync-sourcehut
  24. env:
  25. git_sync_source_repo: git@git.fridu.us:heckyel/cl.git
  26. git_sync_destination_repo: git@git.sr.ht:~heckyel/cl
  27. if: env.git_sync_source_repo && env.git_sync_destination_repo
  28. uses: astounds/git-sync@v1
  29. with:
  30. source_repo: git@git.fridu.us:heckyel/cl.git
  31. source_branch: "master"
  32. destination_repo: git@git.sr.ht:~heckyel/cl
  33. destination_branch: "master"
  34. source_ssh_private_key: ${{ secrets.GIT_SYNC_SOURCE_SSH_PRIVATE_KEY }}
  35. destination_ssh_private_key: ${{ secrets.GIT_SYNC_DESTINATION_SSH_PRIVATE_KEY }}