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 also consider adding a new Member specifically for use in GitHub Actions, as this may provide more security an you can limit the Member to only be a Configurator and not an Admin. The new Member can be added under Account Settings > Team.

Download the Inigo CLI and Log In

Now that you have a password, you can add a GitHub Repository Secret with your Inigo username and password. These secrets can be used in your GitHub Action workflow to authenticate with the inigo CLI.

Here is an example that shows how to create an action that will download the Inigo CLI and run inigo login using the INIGO_USERNAME and INIGO_PASSWORD environment variables.

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

jobs:
inigo:
runs-on: ubuntu-22.04
steps:
- name: Install Inigo CLI
run: wget -c https://github.com/inigolabs/artifacts/releases/latest/download/cli_linux_amd64.tar.gz -O - | tar -xz;

- name: Inigo CLI login
env:
INIGO_USERNAME: ${{ secrets.INIGO_USERNAME }}
INIGO_PASSWORD: ${{ secrets.INIGO_PASSWORD }}
run: ./inigo login

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!