chore(workflow): 更新自动标签工作流配置

- 修改触发条件以支持手动调度
- 重构条件判断逻辑提高可读性
- 保持原有自动化标签功能不变
- 添加对 workflow_dispatch 事件的支持
This commit is contained in:
GeWuYou 2026-02-15 21:05:57 +08:00 committed by gewuyou
parent 487f55fef6
commit cdb7f32497

View File

@ -5,7 +5,7 @@ on:
workflows: ["CI - Build & Test"]
types:
- completed
workflow_dispatch:
concurrency:
group: auto-tag-main
cancel-in-progress: false
@ -13,10 +13,12 @@ concurrency:
jobs:
auto-tag:
if: >
github.event.workflow_run.conclusion == 'success' &&
github.event.workflow_run.head_branch == 'main'&&
contains(github.event.workflow_run.head_commit.message, '[release ci]')
(github.event_name == 'workflow_run' &&
github.event.workflow_run.conclusion == 'success' &&
github.event.workflow_run.head_branch == 'main' &&
contains(github.event.workflow_run.head_commit.message, '[release ci]'))
||
(github.event_name == 'workflow_dispatch')
runs-on: ubuntu-latest
permissions:
contents: write