From 66f23d389aaa16e6488d1f94289059a824379e98 Mon Sep 17 00:00:00 2001
From: Tim Kaune <tim.kaune@gmx.de>
Date: Thu, 11 Apr 2024 10:11:05 +0200
Subject: [PATCH] Add push mirror

---
 .github/workflows/git-sync.yml | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 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..f122176
--- /dev/null
+++ b/.github/workflows/git-sync.yml
@@ -0,0 +1,28 @@
+name: sync-git-mirror
+run-name: Push ${{ github.ref_type }} ${{ github.ref_name }} to git mirror
+on:
+  push:
+    branches:
+      - master
+    tags:
+      - v*
+jobs:
+  git-sync:
+    runs-on: ubuntu-latest
+    steps:
+      - name: git-sync-master
+        uses: wei/git-sync@v3
+        with:
+          source_repo: "lepus2589/accelerate-lapacke"
+          source_branch: "master"
+          destination_repo: "${{ secrets.MIRROR_DESTINATION_REPO_URL }}"
+          destination_branch: "master"
+          destination_ssh_private_key: ${{ secrets.DESTINATION_SSH_PRIVATE_KEY }}
+      - name: git-sync-tags
+        uses: wei/git-sync@v3
+        with:
+          source_repo: "lepus2589/accelerate-lapacke"
+          source_branch: "refs/tags/*"
+          destination_repo: "${{ secrets.MIRROR_DESTINATION_REPO_URL }}"
+          destination_branch: "refs/tags/*"
+          destination_ssh_private_key: ${{ secrets.DESTINATION_SSH_PRIVATE_KEY }}
-- 
GitLab