Home

Awesome

setup-spacectl

build code style: prettier

This is a simple GitHub Action to install spacectl: a utility wrapping Spacelift's GraphQL API for easy programmatic access in command-line contexts - either in manual interactive mode (in your local shell), or in a predefined CI pipeline (GitHub Actions, CircleCI, Jenkins etc).

✨ Usage

Note that the action queries the GitHub API to list the available releases of spacectl so it needs a GitHub token. By default it uses ${{ github.token }} but you can override it by setting the github-token input.

steps:
  - name: Install spacectl
    uses: spacelift-io/setup-spacectl@v1

  - name: Deploy infrastructure
    env:
      SPACELIFT_API_KEY_ENDPOINT: https://mycorp.app.spacelift.io
      SPACELIFT_API_KEY_ID: ${{ secrets.SPACELIFT_API_KEY_ID }}
      SPACELIFT_API_KEY_SECRET: ${{ secrets.SPACELIFT_API_KEY_SECRET }}
    run: spacectl stack deploy --id my-infra-stack

You can optionally provide a specific version:

steps:
  - name: Install spacectl
    uses: spacelift-io/setup-spacectl@v1
    with:
      version: v0.18.0

Inputs

NameDescriptionDefault
versionWhich version of spacectl to install. If not specified, the latest version will be installed (recommended).latest
github-tokenThe GitHub token to use for querying the GitHub API.${{ github.token }}

Outputs

NameDescription
versionThe version of spacectl that was installed.

🛠 Contributing

Contributions are welcome! Three tips.