https://github.com/abronin/ecr-retag-action
:octocat: GitHub Action to retag existing Docker image in AWS ECR
https://github.com/abronin/ecr-retag-action
aws-ecr aws-ecr-tools docker ecr github-actions github-actions-docker
Last synced: 7 months ago
JSON representation
:octocat: GitHub Action to retag existing Docker image in AWS ECR
- Host: GitHub
- URL: https://github.com/abronin/ecr-retag-action
- Owner: abronin
- License: mit
- Created: 2020-11-14T12:52:00.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-03-25T12:50:44.000Z (about 1 year ago)
- Last Synced: 2024-12-01T13:21:27.297Z (7 months ago)
- Topics: aws-ecr, aws-ecr-tools, docker, ecr, github-actions, github-actions-docker
- Language: JavaScript
- Homepage:
- Size: 2.1 MB
- Stars: 28
- Watchers: 2
- Forks: 8
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## About
GitHub Action to add new tags to existing Docker Image. No pull/push here because of manifest schema v2 usage. Only works with AWS ECR registry.
**Table of Contents**
- [Usage](#usage)
- [License Summary](#license-summary)
- [Security Disclosures](#security-disclosures)## Usage
### Provide AWS credential directly.
```sh
- name: Retag test/image:dev as test/image:staging and test/image:production
uses: abronin/ecr-retag-action@v1
with:
aws-account-id: "001234567899" # optional, specify if you need to push to not main account
aws-region: us-west-2 # optional, specify if you don't provide AWS_REGION env variable
repository: test/image
tag: dev
new-tags: staging, production
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: us-west-2```
### Using [aws-actions/configure-aws-credentials](https://github.com/aws-actions/configure-aws-credentials) action.
```sh
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-2- name: Retag test/image:dev as test/image:staging and test/image:production
uses: abronin/ecr-retag-action@v1
with:
repository: test/image
tag: dev
new-tags: staging, production
```## License Summary
This code is made available under the MIT license.
## Security Disclosures
If you would like to report a potential security issue in this project, please do not create a GitHub issue. Instead, please [email me directly](mailto:[email protected]).