Skip to content

Latest commit

 

History

History
37 lines (29 loc) · 1.29 KB

README.md

File metadata and controls

37 lines (29 loc) · 1.29 KB

Docker hub to ECR with GitHub Actions

Automate Multiple Docker image pushes from Docker Hub to Amazon Elastic Container Registry (ECR) using GitHub Actions.

Setup

  1. Clone the Repository: Clone this GitHub repository to your local machine using the following command:

    git clone https://github.com/jrzvnn/docker-ecr-actions

    Navigate to the cloned repository directory:

    cd docker-ecr-actions
  2. GitHub Secrets: Set up the following secrets in your GitHub repository:

    • AWS_ACCESS_KEY_ID: Your AWS access key ID.
    • AWS_SECRET_ACCESS_KEY: Your AWS secret access key.
  3. Define Docker Images: To specify the Docker images you want to push to Amazon ECR, open the scripts.sh file and modify the IMAGES array. Add or remove image names as needed. For example:

        IMAGES=(
        # Define the list of images to pull and push
        )
  4. Commit and Push: Commit both the workflow YAML file and the script file to your repository.

Usage

GitHub Actions will automatically run the workflow on each push to the specified branch, pulling and pushing the Docker images to your ECR repository.

License

This project is licensed under the MIT License. See LICENSE for details.