aboutsummaryrefslogtreecommitdiffstats
path: root/.gitea
diff options
context:
space:
mode:
authorJesus <heckyel@hyperbola.info>2024-08-08 03:24:29 +0800
committerJesus <heckyel@hyperbola.info>2024-08-08 03:24:29 +0800
commitc59fe9f0aa82912b65e51bdbe542e6d1fc718131 (patch)
tree51fabaf1a97babaa72d5bb162cf9bf2f412f8cc9 /.gitea
parent456d727429e849c168a9dea6ae0977a6ce0e63f5 (diff)
downloademacs-personal-c59fe9f0aa82912b65e51bdbe542e6d1fc718131.tar.lz
emacs-personal-c59fe9f0aa82912b65e51bdbe542e6d1fc718131.tar.xz
emacs-personal-c59fe9f0aa82912b65e51bdbe542e6d1fc718131.zip
workflows: set sourcehut like mirror
Diffstat (limited to '.gitea')
-rw-r--r--.gitea/workflows/git-sync.yaml39
1 files changed, 39 insertions, 0 deletions
diff --git a/.gitea/workflows/git-sync.yaml b/.gitea/workflows/git-sync.yaml
new file mode 100644
index 0000000..7ad4e72
--- /dev/null
+++ b/.gitea/workflows/git-sync.yaml
@@ -0,0 +1,39 @@
+name: git-sync-with-mirror
+
+on:
+ push:
+ branches: [ master ]
+ workflow_dispatch:
+
+jobs:
+ git-sync:
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: git-sync
+ env:
+ git_sync_source_repo: git@git.fridu.us:heckyel/emacs-personal.git
+ git_sync_destination_repo: ssh://git@c.fridu.us/software/emacs-personal.git
+ if: env.git_sync_source_repo && env.git_sync_destination_repo
+ uses: astounds/git-sync@v1
+ with:
+ source_repo: git@git.fridu.us:heckyel/emacs-personal.git
+ source_branch: "master"
+ destination_repo: ssh://git@c.fridu.us/software/emacs-personal.git
+ destination_branch: "master"
+ source_ssh_private_key: ${{ secrets.GIT_SYNC_SOURCE_SSH_PRIVATE_KEY }}
+ destination_ssh_private_key: ${{ secrets.GIT_SYNC_DESTINATION_SSH_PRIVATE_KEY }}
+
+ - name: git-sync-sourcehut
+ env:
+ git_sync_source_repo: git@git.fridu.us:heckyel/emacs-personal.git
+ git_sync_destination_repo: git@git.sr.ht:~heckyel/emacs-personal
+ if: env.git_sync_source_repo && env.git_sync_destination_repo
+ uses: astounds/git-sync@v1
+ with:
+ source_repo: git@git.fridu.us:heckyel/emacs-personal.git
+ source_branch: "master"
+ destination_repo: git@git.sr.ht:~heckyel/emacs-personal
+ destination_branch: "master"
+ source_ssh_private_key: ${{ secrets.GIT_SYNC_SOURCE_SSH_PRIVATE_KEY }}
+ destination_ssh_private_key: ${{ secrets.GIT_SYNC_DESTINATION_SSH_PRIVATE_KEY }}