ci: collapse the eight deploy and build-push workflows into two #87
No reviewers
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: Jinemi/thermograph#87
Loading…
Reference in a new issue
No description provided.
Delete branch "ci/consolidate-deploys"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Phase 4a — the CI consolidation, deliberately without the branch-model collapse.
Why split 4a from 4b
Two traps made the original single-pass Phase 4 a bad idea:
PR build (required check) / gate. If that context stops appearing, every PR becomes unmergeable with fully green CI and nothing in the UI says which check is missing —promotion.ts:25documents this exact incident.dev(#62, #59, #34). Collapsing the branch orphans them, and retargeting a base does not re-fire CI.Neither applies to the deploy and build-push workflows: they are push-triggered only, so they never produce a PR check. This PR takes that win and leaves the branch model completely alone.
What changed
Eight files → two. The six deploy workflows were one file written six times, differing only in a branch name, paths filter, concurrency group, service name,
*_IMAGE_TAGvariable and secret prefix. The two build-push files differed only in the domain string.deploy.sh'sSERVICE+*_IMAGE_TAGcontract was already fully parameterised, so the duplication bought nothing.deploy.yml— branch selects environment (main→ beta,release→ prod), matrix covers backend + frontend, each leg checks whether the push touched its domain before rolling.build-push.yml— same shape for images. Published artefacts are unchanged.*-deploy-dev.ymlare deleted, not ported. Already documented as inert: they call a monorepo path on the LAN box, whose~/thermograph-devis still a split-erathermograph-infracheckout.15 workflows → 9. 1365 lines → 1019.
Deliberately boring expressions
No dynamic matrix (
fromJSON), and the*_IMAGE_TAGselection happens in shell rather than amatrix.service == 'x' && a || bternary. Those are GitHub idioms a Forgejo/act runner may evaluate differently, and the failure mode here is silent: an empty*_IMAGE_TAGmakesdeploy.shfall back to the tag already running, so the job goes green having deployed nothing. Beta and prod get two explicit mutually-exclusive steps rather than a ternary oversecrets, where an empty host would be worse still.Preserved, all load-bearing
fetch-depth: 0and the domain-keyed 12-hex tag (the branch tip is usually another domain's commit); per-service per-ref concurrency withcancel-in-progress: false; separatePROD_SSH_*credentials so a beta leak can't reach prod; thev*.*.*both-images exception;appleboy/ssh-actionby full URL.Verification
Replayed the plan step against real history:
changed=falsechanged=false— nothing rollschanged=truechanged=false— sibling untouchedchanged=truechanged=true— deploy rather than silently skipThe frontend tag computed for a backend-only push is
sha-ca84e0ce95f0— exactly the tag live on beta today — so the derivation matches what the old workflows produced.All 9 workflow files parse. Docs naming the deleted files are updated in the same commit, per the rule the root
CLAUDE.mdnow carries.Explicitly left alone
pr-build.yml(its name andgatejob are the required check), plussecrets-guard.ymlandshell-lint.yml— the only other consolidation candidates that run onpull_request. The branch-protection API returned 401 without credentials, so I could not confirm whether their contexts are required. Merging two small files wasn't worth risking an unmergeable repo. That's a follow-up once the required-check list is confirmed.Follow-up for 4b
promotion.tshardcodes the monorepo's check name and applies it to every repo — it flagged centralis PR #14 as having an absent required check, yet the merge succeeded, proving centralis' protection doesn't require that context.CENTRALIS_REQUIRED_CHECKshould become per-repo alongside the branch-model change.