chore(ci): stop building Docker images on every branch push#981
Open
dylanjeffers wants to merge 1 commit into
Open
chore(ci): stop building Docker images on every branch push#981dylanjeffers wants to merge 1 commit into
dylanjeffers wants to merge 1 commit into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Goal
Cut GitHub Actions spend. This repo's Actions cost is dominated by
build.yml.Changes
build.yml— the big one. It previously ran onpush: 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 (latestis only tagged on main). Now:push: mainworkflow_dispatchretained so anyone can build a branch image on demandcancel-in-progressconcurrency so a newer main push supersedes an in-flight buildtest.yml— dropped the redundantpush: maintrigger (those commits were already tested on the PR) and addedcancel-in-progressconcurrency. 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).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 manualworkflow_dispatchcovers ad-hoc branch builds in the meantime.🤖 Generated with Claude Code