Retag an image in Amazon ECR.
You can retag without pulling or pushing the image with Docker. For larger images, this process saves a considerable amount of network bandwidth and time required to retag an image. This action use only AWS CLI, and not use Docker.
- name: Retag an image in Amazon ECR
id: retag-ecr
uses: climatepolicyradar/gha-retag-ecr-action@v0
with:
repository-name: example
source-tag: latest
destination-tag: release
- name: Retag an image in Amazon ECR
id: retag-ecr
uses: climatepolicyradar/[email protected]
with:
repository-name: example
source-tag: latest
destination-tag: release
Use the aws-actions/configure-aws-credentials action to configure the GitHub Actions environment with environment variables containing AWS credentials and your desired region.
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-region: ap-northeast-1
role-to-assume: arn:aws:iam::123456789100:role/my-github-actions-role
role-session-name: ${{ github.event.repository.name }}-${{ github.run_id }}
- name: Retag an image in Amazon ECR
id: retag-ecr
uses: climatepolicyradar/gha-retag-ecr-action@v0
with:
repository-name: example
source-tag: latest
destination-tag: release
We recommend Using OpenID Connect within your workflows to authenticate with AWS.
Name | Description | Default | Required |
---|---|---|---|
repository-name | The name to use for the ECR Repository. | n/a | yes |
source-tag | The source tag. | n/a | yes |
destination-tag | The destination tag. | n/a | yes |
N/A
N/A
N/A
This action requires the following minimum set of permissions:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": ["ecr:ListImages"],
"Resource": "*"
},
{
"Effect": "Allow",
"Action": ["ecr:BatchGetImage", "ecr:PutImage"],
"Resource": [
"arn:aws:ecr:<region>:<aws_account_id>:repository/<repository_name>"
]
}
]
}
Update usage automatically in README.md.
make docs
Run the following command to bump up.
make bump
This command will execute the following steps:
- Update VERSION
- Update README.md
- Commit and push
- Create a pull request
- Open the web browser automatically for reviewing pull request
Then review and merge, so the release is ready to go.
Run the following command to create a new release.
make release
This command will execute the following steps:
- Push tag
- Create a new GitHub Release as a draft
- Open the web browser automatically for editing GitHub Release
Edit to publicize the GitHub Release.
- Click the edit icon on the right side of the page
- Edit the release notes
- Click
Publish release
Then, the new version are published in GitHub Marketplace. Finally, we can use the new version! 🎉
Apache 2 Licensed. See LICENSE for full details.