Skip to content

Latest commit

 

History

History

setup

Infracost setup action

This GitHub Action downloads and installs the Infracost CLI in your GitHub Actions workflow. Subsequent steps in the same job can run the CLI in the same way it is run on the command line using the GitHub Actions run syntax.

Usage

The action can be used as follows. You probably want to run Infracost CLI commands then use the comment action to post comments! See the top-level readme for examples of how these actions can be combined.

steps:
  - name: Setup Infracost
    uses: infracost/actions/setup@v1
    with:
      api-key: ${{ secrets.INFRACOST_API_KEY }}

Inputs

The action supports the following inputs:

  • api-key: Required. Your Infracost API key. It can be retrieved by running infracost configure get api_key. If you don't have one, download Infracost and run infracost register to get a free API key.

  • version: Optional, defaults to 0.9.x. SemVer ranges are supported, so instead of a full version string, you can use 0.9.x. This enables you to automatically get the latest backward compatible changes in the 0.9 release (e.g. new resources or bug fixes).

  • currency: Optional. Convert output from USD to your preferred ISO 4217 currency, e.g. EUR, BRL or INR.

  • pricing-api-endpoint: Optional. For self-hosted users, endpoint of the Cloud Pricing API, e.g. https://cloud-pricing-api.

Outputs

This action does not set any direct outputs.