Skip to content

Commit

Permalink
feat(GitHub Action): 镜像仓库
Browse files Browse the repository at this point in the history
- 使用GitHub Action进行仓库镜像
  • Loading branch information
Mintimate committed Nov 14, 2023
1 parent fc74c42 commit cd73be6
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/mirrorToGitLab.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Sync Repo To GitLab

on:
push:
branches:
- main

env:
SSH_KEY: ${{ secrets.GITLAB_DEPLOY_KEY }} # 服务器私钥
DEPLOY_REPO: ${{ secrets.GITLAB_DEPLOY_REPO }} # 服务器部署仓库地址

jobs:
git-mirror:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: yesolutions/mirror-action@master
with:
REMOTE: ${{ env.DEPLOY_REPO }}
GIT_SSH_PRIVATE_KEY: ${{ env.SSH_KEY }}
GIT_SSH_NO_VERIFY_HOST: "true"

0 comments on commit cd73be6

Please sign in to comment.