Skip to content

🔧(build): Use commit SHA for image tag and add push-cache control#2

Merged
Rhodri-Morgan merged 2 commits into
masterfrom
bugfix/commit-sha-image-tag
Mar 7, 2026
Merged

🔧(build): Use commit SHA for image tag and add push-cache control#2
Rhodri-Morgan merged 2 commits into
masterfrom
bugfix/commit-sha-image-tag

Conversation

@Rhodri-Morgan
Copy link
Copy Markdown
Owner

Summary

  • Always tag images with the first 6 characters of the commit SHA instead of deriving from git ref
  • Add push-cache input to control whether layer cache is written back to the registry

Changes

  • Remove image-tag input; resolve tag from GITHUB_SHA directly
  • Add push-cache input (default false) — cache is only pushed when explicitly enabled
  • Document push-cache guidance in README

Testing

  • Reviewed composite action YAML for correct GitHub Actions expression syntax

Checklist

  • Code follows style guidelines
  • Documentation updated

Co-Authored-By: Claude noreply@anthropic.com

Rhodri-Morgan and others added 2 commits March 7, 2026 19:59
Remove the image-tag input and always derive the tag from GITHUB_SHA,
using the first 6 characters. This ensures consistent, unique tagging
based on the exact commit being built, rather than relying on git refs
which may not always be present or consistent across workflows.

Co-Authored-By: Claude <noreply@anthropic.com>
Add a push-cache input (default false) so cache is only written to the
registry when explicitly enabled. Document in README that push-cache
should only be enabled for images intended to be pushed to ECR.

Co-Authored-By: Claude <noreply@anthropic.com>
@Rhodri-Morgan Rhodri-Morgan marked this pull request as ready for review March 7, 2026 21:09
@Rhodri-Morgan Rhodri-Morgan merged commit f650491 into master Mar 7, 2026
@Rhodri-Morgan Rhodri-Morgan deleted the bugfix/commit-sha-image-tag branch March 7, 2026 21:10
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