Skip to content

Commit 192d8c1

Browse files
committed
Add Codeberg mirror workflow
1 parent 2675f82 commit 192d8c1

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

.github/workflows/mirror.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,26 @@
1-
name: Test SSH
1+
name: Mirror to Codeberg
22

33
on:
4+
push:
45
workflow_dispatch:
56

67
jobs:
7-
test:
8+
mirror:
89
runs-on: ubuntu-latest
910

1011
steps:
12+
- uses: actions/checkout@v4
13+
with:
14+
fetch-depth: 0
15+
1116
- name: Setup SSH
1217
run: |
1318
mkdir -p ~/.ssh
1419
echo "${{ secrets.CODEBERG_SSH_KEY }}" > ~/.ssh/id_ed25519
1520
chmod 600 ~/.ssh/id_ed25519
1621
ssh-keyscan codeberg.org >> ~/.ssh/known_hosts
1722
18-
- name: Test connection
23+
- name: Push mirror
1924
run: |
20-
ssh -T git@codeberg.org
25+
git remote add codeberg git@codeberg.org:TU_USUARIO/${{ github.event.repository.name }}.git || true
26+
git push --mirror codeberg

0 commit comments

Comments
 (0)