ci: 更新镜像同步工作流
- 移除了原有的 Gitea Sync 工作流 - 新增了 Mirroring 工作流,用于同步代码到 GitLab - 使用 yesolutions/mirror-action 实现镜像同步 - 配置了远程仓库地址和认证信息
This commit is contained in:
parent
267e3857d0
commit
e98b619fb1
19
.github/workflows/gitea-sync.yml
vendored
19
.github/workflows/gitea-sync.yml
vendored
@ -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 }}'
|
16
.github/workflows/mirror.yaml
vendored
Normal file
16
.github/workflows/mirror.yaml
vendored
Normal file
@ -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 }}
|
Loading…
x
Reference in New Issue
Block a user