Skip to content

Commit f5f5fff

Browse files
authored
feat(ci): sync to codeberg and gitlab (#168)
1 parent 418fcb2 commit f5f5fff

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

.github/workflows/sync_remote.yml

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

0 commit comments

Comments
 (0)