Hello I am running a problem with Github actions (...
# help
a
Hello I am running a problem with Github actions (my repo is in private/enterprise github)
Copy code
Run infracost/actions/setup@v2
  with:
    api-key: ***
    version: 0.10.x
    currency: USD
    github-token: ***
  env:
    SSH_AUTH_SOCK: /tmp/ssh_agent.sock
    INFRACOST_API_KEY: ***
Error: HttpError: Not Found
w
Hi @acceptable-caravan-50612! I vaguely remember seeing something like this before and it was an IP whitelisting issue with the GH enterprise that was blocking the pricing API lookup calls to Infracost. Can you add
INFRACOST_LOG_LEVEL: debug
to the
env
section and see if the GH Action logs show anymore details? Also, you shouldn’t need the
INFRACOST_API_KEY
env line as the
with.api-key
is already setting that.
a
Copy code
Run infracost/actions/setup@v2
  with:
    api-key: ${INFRACOST_API_KEY}
    version: 0.10.x
    currency: USD
    github-token: ***
  env:
    SSH_AUTH_SOCK: /tmp/ssh_agent.sock
    INFRACOST_API_KEY: ***
    TF_ROOT: .
    INFRACOST_LOG_LEVEL: debug
No logs
w
@acceptable-caravan-50612 did you check if there are HTTP proxy settings being used, or IP whitelisting enabled that might be blocking the CLI’s http calls? If you’re using GitHub Enterprise Cloud, you can try the GitHub App by yourself to see if that works. That automatically adds our IP address to the github enterprise whitelist. DM me if you’d like to arrange screenshare call to debug further or try the GH App.
a
I don’t have permissions to add Github App, I’m trying to create POC to show to my senior
w
cool - I’ll DM you to see how I can help
a
Copy code
- name: Setup Infracost
        uses: infracost/actions/setup@v2
        with:
          api-key: ${{ secrets.INFRACOST_API_KEY }}
instead of
infracosts/actions/setup@v2
can i use a docker image url instead?
w
the docker images are listed here: https://www.infracost.io/docs/integrations/cicd/#other-cicd-systems I’ve not checked recently but I think GH Actions has a way to run docker images, though you’d need to mount the code repo to that image so the CLI can run
a
Is there an example code snippet with using docker image in GHA?
w
The gitlab CI template uses the docker image in case it helps: https://gitlab.com/infracost/infracost-gitlab-ci