Skip to content

chore(ci): build only changed services, amd64-only, on PRs - #69

Closed
dylanjeffers wants to merge 1 commit into
mainfrom
chore/reduce-ci-spend
Closed

chore(ci): build only changed services, amd64-only, on PRs#69
dylanjeffers wants to merge 1 commit into
mainfrom
chore/reduce-ci-spend

Conversation

@dylanjeffers

Copy link
Copy Markdown
Contributor

Goal

Cut GitHub Actions spend. PR builds were the main cost driver in this repo.

Changes

pr.yml previously rebuilt all 13 services for both amd64 and arm64, plus 13 multi-arch manifest jobs, on every PR — regardless of what changed. Now it:

  • detects changed services via dorny/paths-filter (mirrors the change-detection edge.yml already uses on main) — a PR touching one service builds only that service;
  • builds amd64 only as a compile check — arm64 + multi-arch manifests are still produced by edge.yml on merge to main, which is what releases consume;
  • cancels superseded builds when a PR is updated.

build-services.yml gains a build_arm64 input (default true) to support the amd64-only PR path. edge.yml and latest.yml are unchanged (still full multi-arch).

test.yml gains cancel-in-progress concurrency.

Estimated savings

Typical PR goes from 26 builds + 13 manifest jobs → 1 amd64 build. Combined with the change-detection, this removes the large majority of PR build minutes (incl. all PR arm64 runners). Rough estimate ~$8–12/mo of the ~$19/mo.

Note

Relay app removal already landed (89b0fbf); the repo still ships ~12 active services, so CI is trimmed rather than gutted. Per-app path filtering matches edge.yml's existing behavior (a change to a shared packages/* lib won't rebuild dependent services on PR — same limitation as main today; flag if you want shared-lib changes to fan out).

🤖 Generated with Claude Code

pr.yml rebuilt all 13 services for both amd64 and arm64 plus 13 multi-arch
manifest jobs on every PR, regardless of what changed. Now it:
- detects changed services via paths-filter (mirroring edge.yml on main), so
  a PR touching one service builds only that service;
- builds amd64 only (compile check) — arm64 + multi-arch manifests are still
  produced by edge.yml on merge to main;
- cancels superseded in-flight builds via concurrency.

build-services.yml gains a build_arm64 input (default true) to support the
amd64-only PR path; edge.yml/latest.yml behavior is unchanged.

test.yml gains cancel-in-progress concurrency.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@dylanjeffers

Copy link
Copy Markdown
Contributor Author

Closing — main was restructured while this was in flight. The new deploy.yml already addresses the core waste: change-detection on services and main-only builds. Our pr.yml and build-services.yml changes conflict with the deleted files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant