Skip to content

System Initiative GitHub Action

Actions
Interact with the System Initiative workspace from within a GitHub Action
v0.1
Latest
Star (0)

Tags

 (1)

System Initiative GitHub Actions

Use System Initiative workspaces in your GitHub workflows!

NOTE: this is in early private access, and not yet publicly available.

Trigger

Triggers a management function, so you can deploy real infrastructure based on your changes.

Usage

Place this in a .github/workflows workflow on your repository:

- uses: systeminit/actions@main
  with:
    changeSetName: CI
    componentId: 01JH3DZW0QTMH69ZA45299GSWY
    domain: |
      a: new A
      c: new C
      point/x: new x
    apiToken: ${{ secrets.SI_API_TOKEN }}

Input

The with section is where you put the input properties that tell SI what to run and what properties to set:

  • apiToken is the API token you use to access SI from GitHub Actions (see Getting an API Token). We recommend using a secret here, like apiToken: ${{ secrets.SI_API_TOKEN }}.

  • changeSetName is the name of the change set to create when the action runs. (You may alternately specify changeSetId if you want to use an existing change set.)

  • componentId is the ID of the management component.

  • domain is the list of properties you want to set on your component. You can specify the names of each property you want to set directly (like CidrBlock), followed by their value. Any properties you do not specify will be left alone with their current value.

    If you have a nested object (like a "point" object with "x", "y" and "z" properties) you can use a path to the individual property as its name (e.g. "point/x": "100".

    You may specify this as either YAML or JSON. (The | after domain: is important, as it must be passed in as a string!)

Getting an API Token

To use these actions, you will need an API token. To get one:

  1. Go to https://auth.systeminit.com/workspaces.
  2. Click on the Gear icon in the workspace you'd like to use with System Initiative, and click API Tokens. alt text
  3. Create an API token: fill in the name and how long before the token will expire, and click "Create API Token". alt text
  4. Click the Copy button at the bottom right to copy the token, so that you can paste it wherever you like. alt text

We recommend placing the secret into a GitHub secret so you can access it in workflows with {{ secrets.SI_API_TOKEN }} (though you can name it whatever you like)! The examples on this page all assume you have placed it into a repository secret named SI_API_TOKEN.

System Initiative GitHub Action is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Interact with the System Initiative workspace from within a GitHub Action
v0.1
Latest

Tags

 (1)

System Initiative GitHub Action is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.