🐛 fix(ci): route scheduled thirdparty updates through prepare

This commit is contained in:
csh
2026-08-24 11:01:22 +08:00
parent 35e4ce316f
commit 06aafc2c19
3 changed files with 90 additions and 5 deletions
+18 -4
View File
@@ -1,6 +1,19 @@
name: ♻️ 更新第三方 Skills
on:
# schedule 由 prepare.yml 在 prepare job 成功后内部调用;这里不提供独立
# schedule / workflow_dispatch 入口。
workflow_call:
inputs:
source_branch:
required: true
type: string
source_sha:
required: true
type: string
secrets:
WORKFLOW:
required: true
workflow_run:
workflows: ["🧰 准备环境"]
types:
@@ -15,8 +28,8 @@ env:
ACCESS_TOKEN: ${{ secrets.WORKFLOW }}
WORKSPACE_ROOT: "/data/workspace"
WORKSPACE_SLOT: "thirdparty"
SOURCE_BRANCH: ${{ github.event.workflow_run.head_branch }}
SOURCE_SHA: ${{ github.event.workflow_run.head_sha }}
SOURCE_BRANCH: ${{ inputs.source_branch || github.event.workflow_run.head_branch }}
SOURCE_SHA: ${{ inputs.source_sha || github.event.workflow_run.head_sha }}
THIRDPARTY_BRANCH: "thirdparty/skill"
MANIFEST_PATH: ".gitea/ci/thirdparty_skills.json"
GIT_USER_NAME: "ci[bot]"
@@ -24,8 +37,9 @@ env:
jobs:
update_and_sync:
# 仅在 Prepare 于主分支成功后触发(含每日 schedule 触发的 Prepare)。
if: ${{ github.event.workflow_run.conclusion == 'success' && (github.event.workflow_run.head_branch == 'main' || github.event.workflow_run.head_branch == 'master') }}
# workflow_call 只能由 schedule Prepare 的 needs 成功路径进入;
# workflow_run 仍需要显式校验 Prepare 成功且来自主分支。
if: ${{ github.event_name == 'workflow_call' || (github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event != 'schedule' && (github.event.workflow_run.head_branch == 'main' || github.event.workflow_run.head_branch == 'master')) }}
name: 📥 更新快照并同步 main
runs-on: standard-ubuntu-22
permissions: