From 20c7e9faf4648ea8c1899407906bf0d61eeaae5a Mon Sep 17 00:00:00 2001
From: STAM <stam@epicm.org>
Date: Sat, 5 Apr 2025 22:10:43 +0300
Subject: [PATCH] added codeberg

---
 .github/workflows/sync-with-gitlab.yml | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/sync-with-gitlab.yml b/.github/workflows/sync-with-gitlab.yml
index 689d321..26ed0d0 100644
--- a/.github/workflows/sync-with-gitlab.yml
+++ b/.github/workflows/sync-with-gitlab.yml
@@ -15,7 +15,8 @@ jobs:
     strategy:
       matrix:
         repo:
-          - {github: "https://github.com/ZXCmod/.github.git",  bitbucket: "git@bitbucket.org:zxcmod/.github.git" ,  gitlab: "git@gitlab.com:zxcmod/dot-github.git" }
+#         - {github: "",  bitbucket: "", codeberg: "",  gitlab: "" }
+          - {github: "https://github.com/ZXCmod/.github.git",  bitbucket: "git@bitbucket.org:zxcmod/.github.git", codeberg: "git@codeberg.org:ZXC-mod/.github.git", gitlab: "git@gitlab.com:zxcmod/dot-github.git"}
 
     steps:
       - name: Set up SSH key
@@ -25,9 +26,10 @@ jobs:
           mkdir -p ~/.ssh
           echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_ed25519
           chmod 600 ~/.ssh/id_ed25519
+          ssh-keyscan -t rsa,ed25519 bitbucket.org >> ~/.ssh/known_hosts
+          ssh-keyscan -t rsa,ed25519 codeberg.org >> ~/.ssh/known_hosts
           ssh-keyscan -t rsa,ed25519 github.com >> ~/.ssh/known_hosts
           ssh-keyscan -t rsa,ed25519 gitlab.com >> ~/.ssh/known_hosts
-          ssh-keyscan -t rsa,ed25519 bitbucket.org >> ~/.ssh/known_hosts
 
       - name: Clone repository as mirror
         run: |
@@ -39,6 +41,12 @@ jobs:
           git remote set-url origin ${{ matrix.repo.bitbucket }}
           git push --mirror --force
 
+      - name: Push to CodeBerg
+        run: |
+          cd repo-mirror
+          git remote set-url origin ${{ matrix.repo.codeberg }}
+          git push --mirror --force
+
       - name: Push to GitLab
         run: |
           cd repo-mirror