-
-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ci): sync to codeberg and gitlab (#168)
- Loading branch information
Showing
1 changed file
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 git@codeberg.org:mcchris/zenbones.nvim.git | ||
git push --tags --force --prune codeberg 'refs/remotes/origin/*:refs/heads/*' | ||
# GitLab | ||
git remote add gitlab git@gitlab.com:mcchris/zenbones.nvim.git | ||
git push --tags --force --prune gitlab 'refs/remotes/origin/*:refs/heads/*' |