From e98b619fb1527a7c3703c9ba7046f5a63108e525 Mon Sep 17 00:00:00 2001 From: suyiiyii Date: Mon, 20 Jan 2025 12:00:13 +0800 Subject: [PATCH] =?UTF-8?q?ci:=20=E6=9B=B4=E6=96=B0=E9=95=9C=E5=83=8F?= =?UTF-8?q?=E5=90=8C=E6=AD=A5=E5=B7=A5=E4=BD=9C=E6=B5=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移除了原有的 Gitea Sync 工作流 - 新增了 Mirroring 工作流,用于同步代码到 GitLab - 使用 yesolutions/mirror-action 实现镜像同步 - 配置了远程仓库地址和认证信息 --- .github/workflows/gitea-sync.yml | 19 ------------------- .github/workflows/mirror.yaml | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 19 deletions(-) delete mode 100644 .github/workflows/gitea-sync.yml create mode 100644 .github/workflows/mirror.yaml diff --git a/.github/workflows/gitea-sync.yml b/.github/workflows/gitea-sync.yml deleted file mode 100644 index 807f860..0000000 --- a/.github/workflows/gitea-sync.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: Gitea Sync -on: - push: - branches: [ "main", "manifest" ] - workflow_dispatch: - workflow_run: - workflows: ["Docker Build and Publish"] - types: - - completed - - -jobs: - trigger-gitea-sync: - runs-on: ubuntu-latest - steps: - - name: Trigger Gitea sync - run: | - echo "Triggering Gitea sync" - curl 'https://git.suyiiyii.top/api/v1/repos/ssyg/hertz101/mirror-sync' -X POST -H 'Authorization: token ${{ secrets.GITEATOKEN }}' \ No newline at end of file diff --git a/.github/workflows/mirror.yaml b/.github/workflows/mirror.yaml new file mode 100644 index 0000000..e6c9a76 --- /dev/null +++ b/.github/workflows/mirror.yaml @@ -0,0 +1,16 @@ +name: Mirroring + +on: [ push, delete ] + +jobs: + to_gitlab: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - uses: yesolutions/mirror-action@master + with: + REMOTE: 'https://git.suyiiyii.top/ssyg/hertz101.git' + GIT_USERNAME: suyiiyii + GIT_PASSWORD: ${{ secrets.GITEATOKEN }}