Skip to content

build-image: build-push-ecr's successor on docker/build-push-action - #84

Merged
hamishfagg merged 2 commits into
mainfrom
feat/build-image
Nov 19, 2026
Merged

hamishfagg merged 2 commits into
mainfrom
feat/build-image

Conversation

@hamishfagg

@hamishfagg hamishfagg commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

New composite action for GitHub-hosted runners, replacing build-push-ecr one repo at a time; the old action is deleted when its last caller moves.

What it keeps from build-push-ecr: the ECR repository creation with the shared policy, the four tags (<env>-<ref>, <env>-head-<pr sha> on pull requests, <env>, latest), and the BUILD_FOR_ENVIRONMENT and IMAGE_TAG build args.

What changes:

  • docker/build-push-action runs the build. Every flag is a named input (file, target, build-args, build-contexts, secrets, no-cache-filters, context); extra-build-args and remote-builder are gone.
  • Layer cache on every build: the Actions cache with scope=<module-name> and <image>:buildcache in ECR, both mode=max. The gha backend's token stays inside build-push-action.
  • A digest output, for callers that read it from a metadata file today.
  • The shared ECR policy moves to build-image/; build-push-ecr/shared-ecr-policy.json is a symlink to it.

Tested from mindsdb/scratchpad-controller#145, whose dev build checks out this branch.

🤖 Generated with Claude Code

A composite for GitHub-hosted runners that owns only the ECR repository,
the tag convention and the cache convention. Every build flag is a named
input passed to docker/build-push-action, so the gha cache backend gets
its token from the action itself and no shell assembles the build line.
Each build imports from and exports to the Actions cache and
<image>:buildcache in ECR.

build-push-ecr stays for callers still on the in-cluster builder; the
shared ECR policy moves here and the old directory links to it.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@hamishfagg
hamishfagg requested a review from a team as a code owner November 18, 2026 23:52
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@hamishfagg
hamishfagg merged commit dc43b83 into main Nov 19, 2026
6 checks passed
@hamishfagg
hamishfagg deleted the feat/build-image branch November 19, 2026 00:20
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.

2 participants