Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ci): sync to codeberg and gitlab #168

Merged
merged 1 commit into from
Mar 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/workflows/sync_remote.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Sync remote

on: [push, pull_request, delete]

jobs:
push:
runs-on: ubuntu-latest
if: github.repository == 'mcchrish/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/*'
Loading