fix: scope deploy triggers and cancel stale workflow runs
Deploy Claude Dev (Dev) / deploy-claude-dev-dev (push) Waiting to run
Deploy Dashboard (Dev) / deploy-dev (push) Successful in 2m9s

Limit workflow path triggers to each workflow file, add concurrency groups to cancel outdated runs, and checkout the exact triggering SHA for deterministic deploys.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Gan, Jimmy
2026-03-03 00:28:02 +08:00
parent d8e6f5716a
commit ce061c1977
3 changed files with 35 additions and 8 deletions
+11 -2
View File
@@ -11,6 +11,10 @@ on:
description: 'Optional full image ref (for rollback), e.g. claude-dev:dev-abc123'
required: false
concurrency:
group: deploy-claude-dev-dev
cancel-in-progress: true
jobs:
deploy-claude-dev-dev:
runs-on: ubuntu-latest
@@ -19,8 +23,13 @@ jobs:
- /var/packages/ContainerManager/target/usr/bin/docker:/usr/bin/docker
- /volume1/docker/claude-dev:/claude-dev-runtime
steps:
- name: Checkout dev branch
run: git clone --depth 1 --branch dev http://gitea:3000/jimmy/nas-tools.git .
- name: Checkout exact commit
run: |
set -euo pipefail
git init .
git remote add origin http://gitea:3000/jimmy/nas-tools.git
git fetch --depth 1 origin "$GITHUB_SHA"
git checkout --detach FETCH_HEAD
- name: Resolve image tags
run: |