Skip to content

✨(build): make AWS credentials optional for registry cache#6

Merged
Rhodri-Morgan merged 1 commit into
masterfrom
feat/optional-registry-cache
Apr 1, 2026
Merged

✨(build): make AWS credentials optional for registry cache#6
Rhodri-Morgan merged 1 commit into
masterfrom
feat/optional-registry-cache

Conversation

@Rhodri-Morgan
Copy link
Copy Markdown
Owner

Summary

Make AWS credentials optional for the build action. Registry-based layer caching is now an opt-in feature that only activates when all three AWS credentials are provided.

Changes

  • Made AWS inputs optional: aws-region, account-id, and role-arn are now optional with empty string defaults
  • Removed push-cache input: No longer needed since registry caching is always enabled when AWS credentials are present
  • Split build step into two paths:
    • "Build image (with registry cache)" - runs when all AWS inputs are provided, writes cache back to ECR
    • "Build image (no cache)" - runs when any AWS input is missing, uses only local Docker cache
  • Updated action description: Now states "optional registry-based layer caching"
  • Updated README: Clarified that registry caching is optional and removed push-cache from example workflow

Testing

  • Verified both code paths in the action
  • Checked that conditional logic correctly gates AWS setup and ECR operations
  • Confirmed documentation examples are updated

Checklist

  • Code follows style guidelines
  • Changes align with conventional commit format
  • Documentation updated

aws-region, account-id, and role-arn inputs are now optional. When all three are provided, the build uses registry-based layer caching via ECR. When any are missing, the build skips AWS setup and ECR login, using only local Docker cache.

- Removed push-cache input
- Split build step into conditional paths: with cache and without cache
- Updated documentation to clarify registry caching is optional

Co-Authored-By: Claude <noreply@anthropic.com>
@Rhodri-Morgan Rhodri-Morgan marked this pull request as ready for review April 1, 2026 13:41
@Rhodri-Morgan Rhodri-Morgan merged commit 5c7a4c3 into master Apr 1, 2026
@Rhodri-Morgan Rhodri-Morgan deleted the feat/optional-registry-cache branch April 1, 2026 13:41
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