We are using infracost cli via docker image in git...
# help
b
We are using infracost cli via docker image in github actions. Infracost adds ".infracost/*"* folder after as part of cost analysis. In the next run github action checkout gives permission denied error and unable to delete the ".infracost/***" directory. Q. Is there any specific config in infracost CLI to remove the files added as part of cost analysis ?
l
@blue-judge-59473 that seems odd. The
.infracost
directory is needed. What commands are you running?
b
@little-author-61621 Thank you for the response.
.infracost
there is no issue with the cost analysis itself but it is about clean up of
.infracost
directory after the cost analysis. During the next run of the workflow git checkout throws a permission denied error while deleting the folder
.infracost
l
@blue-judge-59473 are you following the examples we have here? https://github.com/infracost/actions?tab=readme-ov-file#quick-start What commands are you running for checking out the git repo
b
we are using the docker image, here is our action workflow. If we don't explicitly clean up the
.infracost
directory the next of the workflow git checkout throw a permission denied error while deleting this directory. Would like to know if there is a better way to do this, doesn't sound right to delete the directory after every run.
l
@blue-judge-59473 ok, the only other thing I would suggest to try is cloning the base branch and PR branch into separate directories. That what we do for our GitLab examples here: https://gitlab.com/infracost/infracost-gitlab-ci
b
Thank you, will separate base and PR branch into separate directories.