Skip to content

Commit ee08739

Browse files
committed
CI/CD: Added mirror workflow to codeberg
1 parent 7d24f3a commit ee08739

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

.github/workflows/mirror.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
on:
2+
push:
3+
workflow_dispatch:
4+
5+
jobs:
6+
7+
mirror-codeberg:
8+
name: Mirror to Codeberg.org
9+
runs-on: ubuntu-latest
10+
steps:
11+
12+
- uses: actions/checkout@v4
13+
with:
14+
fetch-depth: 0
15+
16+
- name: Setup SSH
17+
shell: bash
18+
env:
19+
CODEBERG_SSH_KEY: ${{ secrets.CODEBERG_SSH_KEY }}
20+
CODEBERG_SSH_FINGERPRINT: ${{ vars.CODEBERG_SSH_FINGERPRINT }}
21+
run: |
22+
echo "$CODEBERG_SSH_KEY" > ~/.ssh/mirror_codeberg
23+
echo "$CODEBERG_SSH_FINGERPRINT" >> ~/.ssh/known_hosts
24+
25+
- name: Mirror
26+
shell: bash
27+
env:
28+
CODEBERG_SSH_KEY: ${{ secrets.CODEBERG_SSH_KEY }}
29+
run: |
30+
git remote add codeberg ssh://git@codeberg.org/portablemc/portablemc.git
31+
echo "$CODEBERG_SSH_KEY" > ~/.ssh/mirror_codeberg
32+
GIT_SSH_COMMAND="ssh -i ~/.ssh/mirror_codeberg -o IdentitiesOnly=yes" git push --mirror codeberg

0 commit comments

Comments
 (0)