Skip to content

thalesvon/ecr-login

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ECR login docker action

Actions Status

This action gets a login string to AWS ECR and returns as an output of the action.

This action is only intended to be used for the command aws ecr get-login. For other awscli commands, use actions/aws/cli

Inputs

There are no inputs defined on actions.yml. Everything you write on args: is passed to the entrypoint. It is mandatory to pass AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY. Configure both as secrets

Outputs

login-string

Docker Login string. It looks like this:

docker login -u AWS -p <pass> <ecr-url>

Example usage

    - name: 'Get Login to AWS ECR'
      id: ecr-login
      uses: thalesvon/ecr-login@master
      env:
        AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
        AWS_DEFAULT_OUTPUT: json
        AWS_REGION: us-east-1
        AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
      with:
        args: 'get-login --no-include-email --region ${AWS_REGION}'
    - name: 'Docker Login'
      run: ${{ steps. ecr-login.outputs.login-string }}