Skip to content

Make this action compatible with aws-actions/configure-aws-credentials #20

Description

@dbuades

Behaviour

The official AWS action for setting up credentials works very well for assuming roles. Ideally, this action should be compatible with it. We have been using https://github.com/aws-actions/amazon-ecr-login for logging in, but it is not compatible with your new https://github.com/docker/build-push-action.

Something like this would be very useful:

      - name: Configure AWS Credentials
        uses: aws-actions/configure-aws-credentials@v1
        with:
          aws-access-key-id: ${{ secrets.ACCESS_KEY_ID }}
          aws-secret-access-key: ${{ secrets.SECRET_ACCESS_KEY }}
          aws-region: ${{ secrets.DEFAULT_REGION }}
          role-to-assume: ${{ secrets.ROLE_ARN }}
          role-duration-seconds: 1200
          role-session-name: GithubActions

      - name: Login to Amazon ECR
        uses: docker/login-action@v1
        with:
          registry: ${{ secrets.ECR_REGISTRY }}

     - name: Build and push
        id: docker_build
        uses: docker/build-push-action@v2
        with:
          ...

What do you think? Is there a known workaround to accomplish this? Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions