Skip to content

Commit 3fa9215

Browse files
committed
Create gitlab-sync.yml
1 parent f15feb6 commit 3fa9215

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

.github/workflows/gitlab-sync.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# 通过 Github action, 在仓库的每一次 commit 后自动同步到 Gitlab 上
2+
name: sync2gitlab
3+
on:
4+
push:
5+
# branches:
6+
# - main
7+
jobs:
8+
repo-sync:
9+
env:
10+
SSH_PRIVATE_KEY: ${{ secrets.GITLAB_PRIVATE_KEY }}
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
with:
15+
persist-credentials: false
16+
17+
- name: Configure Git
18+
run: |
19+
git config --global --add safe.directory /github/workspace
20+
21+
- name: sync github -> gitee
22+
uses: wearerequired/git-mirror-action@master
23+
if: env.SSH_PRIVATE_KEY
24+
with:
25+
source-repo: "[email protected]:${{ github.repository }}.git"
26+
destination-repo: "[email protected]:z0z0r4/mcim_monitor.git"

0 commit comments

Comments
 (0)