Skip to content

patrontech/retag-ecr-image

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

retag-ecr-image

Retag an existing ECR image. This does not remove an existing tag, but adds a new tag to an existing docker image in ECR.

Use this in conjunction with aws-actions/configure-aws-credentials and aws-actions/amazon-ecr-login.

Inputs

existing-tag

Required The name of the existing docker image tag that you want to re-tag.

new-tag

Required The the new tag name to give the image in ECR.

repository-name

Required The name of the repository where the existing image can be found.

Outputs

result

This will either be "success" on completion or "failed" followed by an error message if there was an issue.

Example usage

jobs:
  update-docker-image:
    steps:
      - name: Set AWS credentials
        id: set_aws_creds
        uses: aws-actions/configure-aws-credentials@v1
        with:
          aws-access-key-id: ${{ secrets.YOUR_AWS_ACCESS_KEY_ID }}
          aws-secret-access-key: ${{ secrets.YOUR_AWS_SECRET_ACCESS_KEY }}
          aws-region: us-east-1

      - name: Login to ECR
        id: login-ecr
        uses: aws-actions/amazon-ecr-login@v1

      - name: Retag Existing Image
        id: docker_image_build_retag
        uses: patrontech/retag-ecr-image@v1
        with:
          existing-tag: "1.0.0"
          new-tag: "TESTING-1.0.0"
          repository-name: your-ecr-repo-name

About

Retag an existing ECR image

Resources

License

Stars

Watchers

Forks

Packages

No packages published