From cd73be63377b4bf7f6ac88a5cc0b978d6f175a16 Mon Sep 17 00:00:00 2001 From: Mintimate Date: Wed, 15 Nov 2023 00:40:37 +0800 Subject: [PATCH] =?UTF-8?q?feat(GitHub=20Action):=20=E9=95=9C=E5=83=8F?= =?UTF-8?q?=E4=BB=93=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 使用GitHub Action进行仓库镜像 --- .github/workflows/mirrorToGitLab.yaml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/mirrorToGitLab.yaml diff --git a/.github/workflows/mirrorToGitLab.yaml b/.github/workflows/mirrorToGitLab.yaml new file mode 100644 index 0000000..c1a0cf0 --- /dev/null +++ b/.github/workflows/mirrorToGitLab.yaml @@ -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"