🐛 fix(ci): restore workflow-run commit verification

This commit is contained in:
csh
2026-08-24 14:48:19 +08:00
parent fd653ff49d
commit d1568c02cd
4 changed files with 90 additions and 97 deletions
+1 -20
View File
@@ -13,9 +13,6 @@ on:
branches:
- main
workflow_dispatch:
schedule:
# 北京时间(UTC+8)每日 06:00Prepare 成功后内部调用 thirdparty updater。
- cron: "0 22 * * *"
concurrency:
group: prepare-${{ github.repository }}
@@ -167,7 +164,7 @@ jobs:
# refs/heads/* 里,直接校验会失败;改用 PR head SHA,并在下方额外
# fetch PR ref 把 head 提交拉进 bare 仓库。下游 workflow_run 消费者
# 读到的 head_sha 也正是这个 PR head,两者一致。
# - 其它事件(push / schedule / dispatch):沿用 github.sha。
# - 其它事件(push / dispatch):沿用 github.sha。
if [ "$EVENT_NAME" = "pull_request" ]; then
HEAD_SHA="${{ github.event.pull_request.head.sha }}"
PR_NUMBER="${{ github.event.pull_request.number }}"
@@ -293,19 +290,3 @@ jobs:
echo "- npm\`$actual_npm_version\`"
echo "- 缓存目录:\`$FNM_DIR\`"
} >> "$GITHUB_STEP_SUMMARY"
update_thirdparty_scheduled:
# Gitea 1.27 会抑制由 gitea-actions 定时运行产生的后续 workflow_run。
# 因此 schedule 在 Prepare 成功后直接调用 updaterupdater 本身不暴露
# schedule / workflow_dispatch 入口。push / 手动 Prepare 仍走原 workflow_run 链。
needs: prepare
if: ${{ github.event_name == 'schedule' }}
uses: ./.gitea/workflows/update-thirdparty-skills.yml
with:
source_branch: ${{ github.ref_name }}
source_sha: ${{ github.sha }}
secrets:
WORKFLOW: ${{ secrets.WORKFLOW }}
concurrency:
group: update-thirdparty-${{ github.repository }}
cancel-in-progress: false