Deploy worker: trigger on worker/ or the lockfile, not package.json scripts
CI / UI screenshots (before/after) (push) Skipped
CI / Lint (eslint) (push) Successful in 15s
CI / Test (jest) (push) Successful in 16s
CI / Security (npm audit) (push) Failing after 36s
CI / Integration (api) (push) Successful in 1m48s
CI / Scan (secrets, workflows, shell) (push) Successful in 1m46s
CI / Lint (eslint) (pull_request) Successful in 17s
CI / Test (jest) (pull_request) Successful in 15s
CI / Security (npm audit) (pull_request) Successful in 8s
CI / UI (playwright) (push) Successful in 1m46s
CI / Deploy (push) Skipped
CI / Deploy worker (push) Skipped
CI / Notify (push) Skipped
CI / Scan (secrets, workflows, shell) (pull_request) Successful in 1m13s
CI / UI (playwright) (pull_request) Successful in 1m34s
CI / UI screenshots (before/after) (pull_request) Successful in 5s
CI / Integration (api) (pull_request) Canceled after 7m16s
CI / Deploy (pull_request) Canceled after 0s
CI / Deploy worker (pull_request) Canceled after 0s
CI / Notify (pull_request) Canceled after 0s

A lint script change in package.json restarted the worker for nothing.
Every dependency change also changes package-lock.json, so that is enough.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
jaredandClaude Opus 5.5 committed 2026-11-22 20:17:15 -05:00
1 parent 57a6cf72ce
commit 41480bf30a
2 files changed
+4 -3

No files matched your search

+3 -2
View File
@@ -296,7 +296,8 @@ jobs:
GIT_SHA: ${{ github.sha }}
run: |
# Restarting the worker briefly interrupts Gandalf's commands, so only
# deploy when worker code or its dependencies changed (#40).
# deploy when worker code or its dependencies changed (#40). The lockfile
# changes with every dependency change; package.json alone (scripts) doesn't matter.
running=$(curl -fsS --max-time 5 http://10.10.10.65:8080/healthz \
| node -e 'let s="";process.stdin.on("data",d=>s+=d).on("end",()=>console.log((JSON.parse(s).worker_versions||[]).join(" ")))')
echo "Workers run: ${running:-none}"
@@ -304,7 +305,7 @@ jobs:
[ -n "$running" ] || deploy=true
for v in $running; do
if ! git cat-file -e "${v}^{commit}" 2>/dev/null \
|| ! git diff --quiet "$v" "$GIT_SHA" -- worker/ package.json package-lock.json; then
|| ! git diff --quiet "$v" "$GIT_SHA" -- worker/ package-lock.json; then
deploy=true
fi
done