Skip to content

Commit c990bc3

Browse files
authored
Merge pull request #24 from codeguru42/7-cleanup-ecr
7 cleanup ecr
2 parents 04d3e7c + 0d3fad1 commit c990bc3

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

cloud-formation/ecr.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,24 @@ Resources:
77
EncryptionType: AES256
88
ImageScanningConfiguration:
99
ScanOnPush: true
10+
LifecyclePolicy:
11+
LifecyclePolicyText: |
12+
{
13+
"rules": [
14+
{
15+
"rulePriority": 1,
16+
"description": "Keep newest",
17+
"selection": {
18+
"tagStatus": "any",
19+
"countType": "imageCountMoreThan",
20+
"countNumber": 5
21+
},
22+
"action": {
23+
"type": "expire"
24+
}
25+
}
26+
]
27+
}
1028
1129
Outputs:
1230
GoCaptureRepository:

cloud-formation/github-role.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,12 @@ Resources:
7272
ecr:DescribeRepositories,
7373
ecr:GetAuthorizationToken,
7474
ecr:GetDownloadUrlForLayer,
75+
ecr:GetRepositoryPolicy,
7576
ecr:InitiateLayerUpload,
77+
ecr:ListTagsForResource,
7678
ecr:PutImage,
79+
ecr:PutImageScanningConfiguration,
80+
ecr:PutLifecyclePolicy,
7781
ecr:UploadLayerPart
7882
],
7983
"Resource": "*"

0 commit comments

Comments
 (0)