From 1fbf1b04b14e2d5877b2c3b29df7c7903fa7edaf Mon Sep 17 00:00:00 2001
From: Andreas Kloeckner <inform@tiker.net>
Date: Thu, 8 Apr 2021 18:21:42 -0500
Subject: [PATCH] Add Gitlab autopush

---
 .github/workflows/autopush.yml | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
 create mode 100644 .github/workflows/autopush.yml

diff --git a/.github/workflows/autopush.yml b/.github/workflows/autopush.yml
new file mode 100644
index 0000000..f89b08a
--- /dev/null
+++ b/.github/workflows/autopush.yml
@@ -0,0 +1,21 @@
+name: Gitlab mirror
+on:
+    push:
+        branches:
+        - main
+
+jobs:
+    autopush:
+        name: Automatic push to gitlab.tiker.net
+        runs-on: ubuntu-latest
+        steps:
+        -   uses: actions/checkout@v2
+        -   run: |
+                mkdir ~/.ssh && echo -e "Host gitlab.tiker.net\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
+                eval $(ssh-agent) && echo "$GITLAB_AUTOPUSH_KEY" | ssh-add -
+                git fetch --unshallow
+                git push "git@gitlab.tiker.net:inducer/$(basename $GITHUB_REPOSITORY).git"  main
+            env:
+                GITLAB_AUTOPUSH_KEY: ${{ secrets.GITLAB_AUTOPUSH_KEY }}
+
+# vim: sw=4
-- 
GitLab