Git Product home page Git Product logo

Comments (4)

kodzi avatar kodzi commented on August 21, 2024 10

FYI (and others who faced the same error)
append uses: actions/checkout@v1 before uses: kciter/aws-ecr-action@v1 to checkout the content of your repo. Afterwards with your project structure you can leave the path part to default.

Example

jobs:
  build-and-push:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v1
    - uses: kciter/aws-ecr-action@v1
      with:
        access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
        secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
        account_id: ${{ secrets.AWS_ACCOUNT_ID }}
        repo: docker/repo
        region: ap-northeast-2
        tags: latest,${{ github.sha }}
        create_repo: true

from aws-ecr-action.

dwight-biddle avatar dwight-biddle commented on August 21, 2024 10

I believe I found the issue with β€œpath” not working and submitted a PR: #5

Discovered that the root cause of my issue was a docker problem, not a problem with this action. When trying to run a dockerfile in a subfolder, Docker requires that you add the path to the dockerfile in both the parameter specifying the file name (-f) and the PATH context (the '.' in 'docker build .').
When I tried reproducing in docker, I realized the docker command needed to be

docker build -f ./subfolder/my.Dockerfile ./subfolder

So the correct way to build a Dockerfile in a subfolder is to put the following two parameters in the step using this action

          dockerfile: ./subfolder/my.Dockerfile
          path: ./subfolder

from aws-ecr-action.

frani avatar frani commented on August 21, 2024

Ahoy my friends. we are three now !

having the same problem

from aws-ecr-action.

vinodjayachandran avatar vinodjayachandran commented on August 21, 2024

FYI (and others who faced the same error)
append uses: actions/checkout@v1 before uses: kciter/aws-ecr-action@v1 to checkout the content of your repo. Afterwards with your project structure you can leave the path part to default.

Example

jobs:
  build-and-push:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v1
    - uses: kciter/aws-ecr-action@v1
      with:
        access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
        secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
        account_id: ${{ secrets.AWS_ACCOUNT_ID }}
        repo: docker/repo
        region: ap-northeast-2
        tags: latest,${{ github.sha }}
        create_repo: true

It worked for me. Thank you so much

from aws-ecr-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.