Comments (6)
@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.
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.
Awesome! Thanks for the update @kaykhan.
from actions.
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.
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.
@kaykhan thanks for the feedback!
from actions.
Related Issues (17)
- NodeJS12 actions are deprecated HOT 5
- No valid Terraform files found at the given path, try a different directory | Github action HOT 2
- github action infracost/actions/setup@v2 failing because node12 is blocked by github HOT 5
- Infracost
- Trouble with infracost diff HOT 2
- Error: No INFRACOST_API_KEY environment variable is set. HOT 10
- Infracost estimate: monthly cost will increase by $0.00 - When base branch is empty HOT 5
- feature: support multi api-key HOT 2
- Increment to Node 20 HOT 2
- Action not working with Terraform Cloud HOT 12
- Infracost comment github --tag HOT 5
- GITHUB_TOKEN permissions used by this action
- Empty Infracost output HOT 8
- Not able to download modules from private hosting HOT 25
- Usage of PR_NUMBER while using reusable workflow . HOT 3
- post_condition seems to have disapeared from new GH Action HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from actions.