Skip to main content

Using Inigo CLI in a GitHub Action

Using the Inigo CLI in GitHub actions required a username/password login, and can be set up with the two following options:

Option 1: Set Your Inigo Password for GitHub Actions

If you've been logging into Inigo only with SSO (Google or GitHub), you still have the ability to set up a password to authenticate with Inigo. This password is needed for authenticating the CLI inside of the GitHub Action.

You can set a password under Account Settings underneath the user menu on app.inigo.io.

Option 2: Add a Dedicated Member for GitHub Actions

You should consider adding a new member specifically for use in GitHub Actions, as this may provide more security. You can limit the member to only be a Configurator and not an Admin. Contact [email protected] for assistance.

Install Inigo Github Action

Now that you have a password, you can add a GitHub Repository Secret with your Inigo username and password. These secrets will be used in your Inigo GitHub Action for authentication.

Here is an example of how to configure your ci.yml with the Inigo GitHub Action to perform all schema checks and have all errors reported as annotations. Full documentation can be found here.

ci.yaml
name: example-inigo-action
on:
push:
branches:
- 'master'
pull_request:
workflow_dispatch:

jobs:
inigo:
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Inigo GraphQL
uses: inigolabs/github-action@main
with:
username: ${{ secrets.INIGO_USERNAME }}
password: ${{ secrets.INIGO_PASSWORD }}
path: configs/*.yml

You will now be able to add addional steps with run commands for inigo. For example, you could run inigo apply to apply Inigo configurations as part of your GitHub action!