Skip to content

chore(ci): stop building Docker images on every branch push#981

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

chore(ci): stop building Docker images on every branch push#981
dylanjeffers wants to merge 1 commit into
mainfrom
chore/reduce-ci-spend

Conversation

@dylanjeffers

Copy link
Copy Markdown
Contributor

Goal

Cut GitHub Actions spend. This repo's Actions cost is dominated by build.yml.

Changes

build.yml — the big one. It previously ran on push: branches: ["**"] — a full amd64 + arm64 multi-arch build + push + GitHub Release on every push to every branch. Branch-sha images aren't consumed by any deploy (latest is only tagged on main). Now:

  • builds only on push: main
  • workflow_dispatch retained so anyone can build a branch image on demand
  • cancel-in-progress concurrency so a newer main push supersedes an in-flight build

test.yml — dropped the redundant push: main trigger (those commits were already tested on the PR) and added cancel-in-progress concurrency. Tests still gate every PR into main.

Estimated savings

Eliminates multi-arch Docker builds on all feature-branch pushes — the majority of this repo's ~$14/mo. Rough estimate 60–70% of api Actions spend ($8–10/mo).

⚠️ Reviewer check

Confirm nothing pulls audius/api:<sha> images built from non-main branches (e.g. ephemeral test envs). If something does, we can re-add a narrower trigger. The manual workflow_dispatch covers ad-hoc branch builds in the meantime.

🤖 Generated with Claude Code

build.yml ran a full amd64 + arm64 multi-arch build, push, and GitHub
Release on push to every branch ("**"). Branch images aren't consumed by
any deploy, so this was the largest single source of Actions spend in the
repo. Build only on main (manual workflow_dispatch retained for on-demand
branch builds) and add cancel-in-progress concurrency.

test.yml dropped the redundant push:main run (those commits are already
tested on the PR) and gained cancel-in-progress concurrency.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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