Skip to content

Commit 2efd588

Browse files
committed
fix lifecycle policy
1 parent 9738146 commit 2efd588

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

.github/workflows/release.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,11 @@ jobs:
124124
--repository-name quickstart-aws-containers-${{ matrix.package }}-prod \
125125
--image-tag-mutability IMMUTABLE \
126126
--image-scanning-configuration scanOnPush=true \
127+
|| true
128+
129+
# Apply lifecycle policy separately
130+
aws ecr put-lifecycle-policy \
131+
--repository-name quickstart-aws-containers-${{ matrix.package }}-prod \
127132
--lifecycle-policy '{"rules":[{"rulePriority":1,"description":"Keep only 5 tagged images","selection":{"tagStatus":"tagged","countType":"imageCountMoreThan","countNumber":5},"action":{"type":"expire"}},{"rulePriority":2,"description":"Remove untagged images","selection":{"tagStatus":"untagged","countType":"imageCountMoreThan","countNumber":0},"action":{"type":"expire"}}]}' \
128133
|| true
129134

0 commit comments

Comments
 (0)