Skip to content

Commit 197e165

Browse files
authored
add-ecr-registry-external-accout-access (#4)
1 parent f9d8dad commit 197e165

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,15 @@ jobs:
4141
runs-on: ubuntu-latest
4242
steps:
4343
- id: ecr-deploy
44-
uses: bitovi/[email protected].1
44+
uses: bitovi/[email protected].2
4545
with:
4646
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
4747
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
4848
aws_default_region: us-east-1
49+
aws_ecr_repo_mutable: true
50+
aws_ecr_repo_encryption_type: AES256
51+
aws_ecr_repo_read_external_aws_account: 123456789.987654321
52+
aws_ecr_lifecycle_policy_input: '{\"rules\":[{\"rulePriority\":1,\"description\":\"expire-after-100\",\"selection\":{\"tagStatus\":\"any\",\"countType\":\"imageCountMoreThan\",\"countNumber\":100},\"action\":{\"type\":\"expire\"}}]}'
4953
```
5054
5155
### Inputs
@@ -100,6 +104,8 @@ The following inputs can be used as `step.with` keys
100104
| `aws_ecr_repo_policy_input` | String | The JSON policy to apply to the repository. If defined overrides the default policy. |
101105
| `aws_ecr_repo_read_arn` | String | The ARNs of the IAM users/roles that have read access to the repository. (Comma separated list). |
102106
| `aws_ecr_repo_write_arn` | String | The ARNs of the IAM users/roles that have read/write access to the repository. (Comma separated list). |
107+
| `aws_ecr_repo_read_external_aws_account`| String | Comma separated list of AWS Accounts IDs that will be provided with read access to the registry. |
108+
| `aws_ecr_repo_write_external_aws_account`| String | Comma separated list of AWS Accounts IDs that will be provided with write access to the registry. |
103109
| `aws_ecr_repo_read_arn_lambda` | String | The ARNs of the Lambda service roles that have read access to the repository. (Comma separated list). |
104110
| `aws_ecr_lifecycle_policy_input` | String | The policy document. This is a JSON formatted string. See more details about [Policy Parameters](http://docs.aws.amazon.com/AmazonECR/latest/userguide/LifecyclePolicies.html#lifecycle_policy_parameters) in the official AWS docs. |
105111
| `aws_ecr_public_repo_catalog` | String | Catalog data configuration for the repository. Defaults to `{}`. |

action.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,12 @@ inputs:
103103
aws_ecr_repo_write_arn:
104104
description: 'The ARNs of the IAM users/roles that have read/write access to the repository. (Comma separated list)'
105105
required: false
106+
aws_ecr_repo_read_external_aws_account:
107+
description: 'The ARNs of the external AWS accounts that have read access to the repository'
108+
required: false
109+
aws_ecr_repo_write_external_aws_account:
110+
description: 'The ARNs of the external AWS accounts that have write access to the repository'
111+
required: false
106112
aws_ecr_repo_read_arn_lambda:
107113
description: 'The ARNs of the Lambda service roles that have read access to the repository. (Comma separated list)'
108114
required: false
@@ -136,7 +142,7 @@ runs:
136142
steps:
137143
- name: Deploy with BitOps
138144
id: deploy
139-
uses: bitovi/github-actions-commons@v1
145+
uses: bitovi/github-actions-commons@v2
140146
with:
141147
# Current repo vars
142148
bitops_code_only: ${{ inputs.bitops_code_only }}
@@ -176,6 +182,8 @@ runs:
176182
aws_ecr_repo_policy_input: ${{ inputs.aws_ecr_repo_policy_input }}
177183
aws_ecr_repo_read_arn: ${{ inputs.aws_ecr_repo_read_arn }}
178184
aws_ecr_repo_write_arn: ${{ inputs.aws_ecr_repo_write_arn }}
185+
aws_ecr_repo_read_external_aws_account: ${{ inputs.aws_ecr_repo_read_external_aws_account }}
186+
aws_ecr_repo_write_external_aws_account: ${{ inputs.aws_ecr_repo_write_external_aws_account }}
179187
aws_ecr_repo_read_arn_lambda: ${{ inputs.aws_ecr_repo_read_arn_lambda }}
180188
aws_ecr_lifecycle_policy_input: ${{ inputs.aws_ecr_lifecycle_policy_input }}
181189
aws_ecr_public_repo_catalog: ${{ inputs.aws_ecr_public_repo_catalog }}

0 commit comments

Comments
 (0)