Skip to content

Commit 3b3877b

Browse files
committed
feat: add automatic mirroring to codeberg and gitlab
Signed-off-by: Goetz Goerisch <g.goerisch@vdw.de>
1 parent 1f7b74d commit 3b3877b

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/workflows/git-mirror.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
name: Git Mirror
3+
# Mirror git repo to other sites
4+
5+
on:
6+
workflow_dispatch:
7+
push:
8+
branches:
9+
- develop
10+
11+
permissions:
12+
contents: read
13+
14+
jobs:
15+
mirror:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v6
20+
with:
21+
fetch-depth: 0
22+
persist-credentials: false
23+
24+
- name: "Sync repo codeberg"
25+
uses: yesolutions/mirror-action@662fce0eced8996f64d7fa264d76cddd84827f33
26+
with:
27+
REMOTE: ${{ secrets.CODEBERG_URL }}
28+
GIT_USERNAME: ${{ secrets.CODEBERG_USER }}
29+
GIT_PASSWORD: ${{ secrets.CODEBERG_TOKEN }}
30+
31+
- name: "Sync repo gitlab"
32+
uses: yesolutions/mirror-action@662fce0eced8996f64d7fa264d76cddd84827f33
33+
with:
34+
REMOTE: ${{ secrets.GITLAB_URL }}
35+
REMOTE_NAME: gitlab
36+
GIT_USERNAME: ${{ secrets.GITLAB_USER }}
37+
GIT_PASSWORD: ${{ secrets.GITLAB_TOKEN }}

0 commit comments

Comments
 (0)