aws / aws/graph-explorer

Cleanup old PR builds in ECR

Open
#1,126 0 comments 0 reactions 0 assignees View on GitHub
infrastructure
Dominant language
TypeScript
Stars
481
Forks
108
Avg merge
6d 8h
Merged PRs (30d)
5

Description

PR images are temporary and should be cleaned up after PRs are closed or after some retention period.
Without cleanup, ECR will accumulate unnecessary images.

### Proposal
- Add a **GitHub Action on `pull_request.closed`** that deletes images tagged with `pr-*`.
- Add an **ECR lifecycle policy** to prune old PR images:
- Keep last N builds (e.g., 5) per PR tag.
- Expire the rest automatically.

### Acceptance Criteria
- [ ] Closed PRs no longer have active `pr-` images in ECR.
- [ ] ECR lifecycle policy is in place to limit total PR builds retained.
- [ ] Release images (`latest`, `latest-snapshot`, and version tags) are not affected.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.