fix(ci): Add concurrency control to prevent queue buildup

沿用 AIOPS 設計:
- cancel-in-progress: true - 新 commit 自動取消舊 workflow
- workflow_dispatch 支援手動觸發
- concurrency group 隔離不同分支

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
OG T
2026-03-24 09:25:59 +08:00
parent 385d1c734e
commit ffc7b1fdcc
3 changed files with 17 additions and 0 deletions

View File

@@ -6,6 +6,12 @@ on:
paths-ignore:
- 'docs/**'
- '*.md'
workflow_dispatch:
# 沿用 AIOPS 設計: 新 commit 自動取消舊 workflow
concurrency:
group: cd-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
REGISTRY: 192.168.0.110:5000

View File

@@ -5,6 +5,12 @@ on:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
# 沿用 AIOPS 設計: 新 commit 自動取消舊 workflow
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
NODE_VERSION: '20'

View File

@@ -46,6 +46,11 @@ on:
default: false
type: boolean
# 沿用 AIOPS 設計: 新 commit 自動取消舊 workflow
concurrency:
group: deploy-prod-${{ github.ref }}
cancel-in-progress: true
env:
# Harbor 金庫 (110 主機) - 使用 IP 避免 TLS 證書問題
REGISTRY: 192.168.0.110:5000