Skip to content

Commit

Permalink
ecr
Browse files Browse the repository at this point in the history
  • Loading branch information
jakeyheath committed May 1, 2024
1 parent cc678fb commit e13ab74
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/docker-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
pk: ${{ secrets.CZI_GITHUB_HELPER_PK }}
with:
env: rdev
ecr_root_path: ./.infra/ecr
images: |
[
{
Expand Down
16 changes: 16 additions & 0 deletions .infra/ecr/lifecycle-policy.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"rules": [
{
"rulePriority": 1,
"description": "Keep at most 1000 images",
"selection": {
"tagStatus": "any",
"countType": "imageCountMoreThan",
"countNumber": 1000
},
"action": {
"type": "expire"
}
}
]
}
29 changes: 29 additions & 0 deletions .infra/ecr/repository-policy.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "OrganizationReadOnlyAccess",
"Effect": "Allow",
"Principal": "*",
"Action": [
"ecr:BatchCheckLayerAvailability",
"ecr:BatchGetImage",
"ecr:DescribeImageScanFindings",
"ecr:DescribeImages",
"ecr:DescribeRepositories",
"ecr:GetAuthorizationToken",
"ecr:GetDownloadUrlForLayer",
"ecr:GetLifecyclePolicy",
"ecr:GetLifecyclePolicyPreview",
"ecr:GetRepositoryPolicy",
"ecr:ListImages",
"ecr:ListTagsForResource"
],
"Condition": {
"StringEquals": {
"aws:PrincipalOrgID": "o-56v5gp5fcu"
}
}
}
]
}

0 comments on commit e13ab74

Please sign in to comment.