Git Product home page Git Product logo

Comments (6)

aliscott avatar aliscott commented on August 23, 2024

@kaykhan are you able to share some additional logs, so we can see at which stage the failure is happening. Once you find the failing step you could add the following to check that the directory exists:

- name: Print directory contents
  run: ls -la

One thing I noticed is that this looks odd: /home/runner/work/infra-kafka/infra-kafka/applications/prod/kafka-ui. It seems like it's repeating the infra-kafka directory twice.

from actions.

kaykhan avatar kaykhan commented on August 23, 2024

I moved away from using working-directory as a default as it does not work with uses github actions. I am assuming there is some conflict occuring whenever working-directory is set. Sorry i cannot be more helpful right now.

Instead i now specify a TF_ROOT variable and it works.

...
`TF_ROOT: applications/prod/kafka-ui`
...

  cost:
    needs: plan
    name: cost
    runs-on: ubuntu-latest
    steps:
    - name: Checkout
      uses: actions/checkout/@v3
    - name: Setup Infracost
      uses: infracost/actions/setup@v2
      with:
        api-key: ${{ secrets.INFRACOST_API_KEY }}
    - name: Checkout base branch
      uses: actions/checkout@v3
      with:
        ref: '${{ github.event.pull_request.base.ref }}'
    - name: Generate Infracost cost estimate baseline
      run: |
        infracost breakdown --path=${{ inputs.TF_ROOT }} \
                            --format=json \
                            --out-file=/tmp/infracost-base.json
    - name: Checkout PR branch
      uses: actions/checkout@v3
    - name: Generate Infracost diff
      run: |
        infracost diff --path=${{ inputs.TF_ROOT }} \
                        --format=json \
                        --compare-to=/tmp/infracost-base.json \
                        --out-file=/tmp/infracost.json
    - name: Post Infracost comment
      run: |
          infracost comment github --path=/tmp/infracost.json \
                                   --repo=$GITHUB_REPOSITORY \
                                   --github-token=${{github.token}} \
                                   --pull-request=${{github.event.pull_request.number}} \
                                   --behavior=new

from actions.

aliscott avatar aliscott commented on August 23, 2024

Awesome! Thanks for the update @kaykhan.

from actions.

alikhajeh1 avatar alikhajeh1 commented on August 23, 2024

Hi @kaykhan, I'm curious to learn if you considered using the GitHub App as it has several benefits? the feedback helps us learn if we should keep investing in making the GH Actions easier to use in the future too

from actions.

kaykhan avatar kaykhan commented on August 23, 2024

Hi @kaykhan, I'm curious to learn if you considered using the GitHub App as it has several benefits? the feedback helps us learn if we should keep investing in making the GH Actions easier to use in the future too

No particular reason. When we were building our custom terraform ci/cd pipeline using github actions - We thought it was simpler to setup Infracost Github Actions because Infracost Github App setup looks a little more involved.

Maybe its something we would use in the future but right now we are happy with what we have. Infracost for us is a nice to have but not super essential so just a time trade off.

from actions.

alikhajeh1 avatar alikhajeh1 commented on August 23, 2024

@kaykhan thanks for the feedback!

from actions.

Related Issues (17)

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.