title: Github actions: aws ecr login fails
body: <p>I am trying to setup CI for my github repository. After each push in sandbox branch I want build a docker image my project and push to AWS ECR.</p>
  
  <p>Here is my .github/workflows/aws.yml file - </p>
  
  <pre><code>name: be-harvester CI
  
  on:
    pull_request:
      branches:         
      - sandbox
    push:
      branches:         
      - sandbox   
  
  env:
    AWS_REPOSITORY_URL: ${{ secrets.AWS_REPOSITORY_URL }}
    AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
    AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
  
  jobs:
    build-and-push:
      name: Build and push image to AWS ECR
      runs-on: ubuntu-latest
      steps:
  
      - name: Checkout
        uses: actions/checkout@master
  
      - name: Check REPO url
        run: echo $AWS_REPOSITORY_URL
  
      - name: Setup ECR
        run: $( aws ecr get-login --no-include-email --region ap-south-1)
  
      - name: Build and tag the image
        run: docker build -t $AWS_REPOSITORY_URL .
  
      - name: Push
        run: docker push $REPOSITORY_URL
  </code></pre>
  
  <p>Build fails at aws ecr login step, here is the screenshot of build log.
  <a href="https://i.stack.imgur.com/4kodM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4kodM.png" alt="enter image description here"></a></p>
  
  <p>What is the reason of this error?</p>