From bea10a9052f13bfe66ecf6d4b602cc2121bc2816 Mon Sep 17 00:00:00 2001
From: Didi Hou <didi.hou@rwth-aachen.de>
Date: Sat, 23 Mar 2024 16:32:31 +0100
Subject: [PATCH] created workflow to push to mirror repo on ebrains

---
 .github/workflows/ebrains-push.yml | 31 ++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)
 create mode 100644 .github/workflows/ebrains-push.yml

diff --git a/.github/workflows/ebrains-push.yml b/.github/workflows/ebrains-push.yml
new file mode 100644
index 0000000..a02aefa
--- /dev/null
+++ b/.github/workflows/ebrains-push.yml
@@ -0,0 +1,31 @@
+name: Mirror to EBRAINS
+
+on:
+  push:
+    branches: [ master ]
+
+jobs:
+  sync_to_ebrains:
+    runs-on: ubuntu-latest
+    if: ${{ github.repository_owner == 'didi-hou' }}
+    steps:
+      - name: Harden Runner
+        uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
+        with:
+          egress-policy: audit
+          disable-telemetry: true
+
+      - name: sycnmaster
+        uses: wei/git-sync@55c6b63b4f21607da0e9877ca9b4d11a29fc6d83
+        with:
+          source_repo: "INM-6/multi-area-model"
+          source_branch: "master"
+          destination_repo: "https://ghpusher:${{ secrets.EBRAINS_GITLAB_ACCESS_TOKEN }}@gitlab.ebrains.eu/didi-hou/multi-area-model.git"
+          destination_branch: "master"
+      - name: synctags
+        uses: wei/git-sync@55c6b63b4f21607da0e9877ca9b4d11a29fc6d83
+        with:
+          source_repo: "INM-6/multi-area-model"
+          source_branch: "refs/tags/*"
+          destination_repo: "https://ghpusher:${{ secrets.EBRAINS_GITLAB_ACCESS_TOKEN }}@gitlab.ebrains.eu/didi-hou/multi-area-model.git"
+          destination_branch: "refs/tags/*"
\ No newline at end of file
-- 
GitLab