diff --git a/.github/workflows/mirror-to-codeberg.yml b/.github/workflows/mirror-to-codeberg.yml new file mode 100644 index 0000000..620b491 --- /dev/null +++ b/.github/workflows/mirror-to-codeberg.yml @@ -0,0 +1,26 @@ +name: Mirror to Codeberg + +on: + push: + branches: + - main + +jobs: + mirror: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up SSH + run: | + mkdir -p ~/.ssh + echo "${{ secrets.CODEBERG_SSH_KEY }}" > ~/.ssh/id_ed25519 + chmod 600 ~/.ssh/id_ed25519 + ssh-keyscan codeberg.org >> ~/.ssh/known_hosts + + - name: Push to Codeberg + run: | + git remote add codeberg git@codeberg.org:SecureBitChat/securebit-chat.git + git push codeberg main --force