Skip to content

Commit cd73be6

Browse files
committed
feat(GitHub Action): 镜像仓库
- 使用GitHub Action进行仓库镜像
1 parent fc74c42 commit cd73be6

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

.github/workflows/mirrorToGitLab.yaml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Sync Repo To GitLab
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
env:
9+
SSH_KEY: ${{ secrets.GITLAB_DEPLOY_KEY }} # 服务器私钥
10+
DEPLOY_REPO: ${{ secrets.GITLAB_DEPLOY_REPO }} # 服务器部署仓库地址
11+
12+
jobs:
13+
git-mirror:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v3
17+
with:
18+
fetch-depth: 0
19+
- uses: yesolutions/mirror-action@master
20+
with:
21+
REMOTE: ${{ env.DEPLOY_REPO }}
22+
GIT_SSH_PRIVATE_KEY: ${{ env.SSH_KEY }}
23+
GIT_SSH_NO_VERIFY_HOST: "true"

0 commit comments

Comments
 (0)