Behaviour
Logging into a registry in a different AWS account doesn't work when using CLI v1, with the get-login command.
Steps to reproduce this issue
- Create a user in ACCOUNT A
- Create a repository in ACCOUNT B
- Grant the user in ACCOUNT A permission to access the repository in ACCOUNT B
- Run
docker/login-action with credentials from ACCOUNT A and try to push/pull an image from ACCOUNT B
Expected behaviour
Should work fine
Actual behaviour
Access denied
Configuration
name: Main Workflow
on:
push:
branches:
- master
jobs:
build:
name: Build & push image
runs-on: ubuntu-18.04
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
- name: Login to ECR
uses: docker/login-action@v1
with:
registry: 085895507678.dkr.ecr.us-west-2.amazonaws.com
username: ${{ secrets.AWS_ACCESS_KEY }}
password: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
- name: Build and push
uses: docker/build-push-action@v2
with:
push: true
tags: 085895507678.dkr.ecr.us-west-2.amazonaws.com/docker-login-test:latest
Logs
See build link.
Behaviour
Logging into a registry in a different AWS account doesn't work when using CLI v1, with the
get-logincommand.Steps to reproduce this issue
docker/login-actionwith credentials from ACCOUNT A and try to push/pull an image from ACCOUNT BExpected behaviour
Actual behaviour
Configuration
Logs
See build link.