mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2025-12-15 14:22:55 +08:00
✨ 添加GitCode同步工作流和更新插件仓库地址
This commit is contained in:
parent
46a652bb27
commit
811fae6208
20
.github/workflows/sync-to-gitcode.yml
vendored
Normal file
20
.github/workflows/sync-to-gitcode.yml
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
name: Sync to GitCode (Only on PR Merge to Main)
|
||||
on:
|
||||
pull_request:
|
||||
types: [closed] # 监听 PR 关闭事件
|
||||
branches: [main] # 仅当目标分支是 main 时才触发
|
||||
|
||||
jobs:
|
||||
sync:
|
||||
if: github.event.pull_request.merged == true # 仅当 PR 被合并时运行
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: main # 检出 main 分支
|
||||
fetch-depth: 0 # 获取完整历史
|
||||
|
||||
- name: Push to GitCode
|
||||
run: |
|
||||
git remote add gitcode https://qq_41605780:${{ secrets.GITCODE_TOKEN }}@gitcode.com/qq_41605780/zhenxun_bot.git
|
||||
git push gitcode HEAD:main --force-with-lease
|
||||
@ -9,3 +9,6 @@ DEFAULT_GITHUB_URL = "https://github.com/zhenxun-org/zhenxun_bot_plugins/tree/ma
|
||||
|
||||
EXTRA_GITHUB_URL = "https://github.com/zhenxun-org/zhenxun_bot_plugins_index/tree/index"
|
||||
"""插件库索引github仓库地址"""
|
||||
|
||||
DEFAULT_GITCODE_RAW_URL = "https://raw.gitcode.com/gh_mirrors/zh/zhenxun_bot/raw/main"
|
||||
"""伴生插件gitcode仓库地址"""
|
||||
|
||||
Loading…
Reference in New Issue
Block a user