Git Product home page Git Product logo

Comments (4)

crazy-max avatar crazy-max commented on May 23, 2024

@dbuades This action already handles AWS Elastic Container Registry (ECR):

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

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

If role-* are required on your side, then yes maybe we should be compatible with aws-actions/configure-aws-credentials.

from login-action.

dbuades avatar dbuades commented on May 23, 2024

@dbuades This action already handles AWS Elastic Container Registry (ECR):

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

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

If role-* are required on your side, then yes maybe we should be compatible with aws-actions/configure-aws-credentials.

Yes, that's what I meant, we need roles on our side and unfortunately this action doesn't support them.
I guess making this action compatible with aws-actions/configure-aws-credentials is the easiest way to go, so that's why I suggested it.
Thanks and sorry if I didn't explain myself clearly!

from login-action.

crazy-max avatar crazy-max commented on May 23, 2024

@dbuades

Yes, that's what I meant, we need roles on our side and unfortunately this action doesn't support them.

My bad I read it wrong. Something like this should work in the meantime:

      - 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 }}
          username: ${{ secrets.ACCESS_KEY_ID }}
          password: ${{ secrets.SECRET_ACCESS_KEY }}

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

Env vars exported by aws-actions/configure-aws-credentials will be used through the ecr get-login cmd

from login-action.

dbuades avatar dbuades commented on May 23, 2024

That was really really quick, thanks!

from login-action.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.