-
-
Notifications
You must be signed in to change notification settings - Fork 49
25 lines (23 loc) · 979 Bytes
/
sync_remote.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
name: Sync remote
on: [push, delete]
jobs:
push:
runs-on: ubuntu-latest
if: github.repository == 'zenbones-theme/zenbones.nvim'
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Sync remote repositories
run: |
mkdir -p ~/.ssh
echo "${{ secrets.GIT_SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
# Ignore hosts keys, since we accept them as-is
git config --global core.sshCommand 'ssh -i ~/.ssh/id_rsa -o IdentitiesOnly=yes -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no'
# Codeberg
git remote add codeberg [email protected]:mcchris/zenbones.nvim.git
git push --tags --force --prune codeberg 'refs/remotes/origin/*:refs/heads/*'
# GitLab
git remote add gitlab [email protected]:mcchris/zenbones.nvim.git
git push --tags --force --prune gitlab 'refs/remotes/origin/*:refs/heads/*'