Skip to content

Warning

You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?

Setup Spacectl

Actions
This action installs the Spacectl CLI tool and adds it to the PATH.
v0.8.0
Verified creator
Star (3)

Tags

 (1)

Verified

GitHub has manually verified the creator of the action as an official partner organization. For more info see About badges in GitHub Marketplace.

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

GITHUB_TOKEN environment variable is a must because we're using it internally to list all releases of spacectl to find the latest one.

steps:
  - name: Install spacectl
    uses: spacelift-io/setup-spacectl@main
    env:
      GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

  - 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@main
    env:
      GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
    with:
      version: v0.18.0

Inputs

Name Description Default
version Which version of spacectl to install. If not specified, the latest version will be installed (recommended). latest

Outputs

Name Description
version The version of spacectl that was installed.

🛠 Contributing

Contributions are welcome! Three tips.

  • If you edited a file in ./src folder, make sure you format it with npm run format and build it with npm run build. The Action uses the output of the build (dist/index.js) as its entry point so contributors must manually build it.

  • If you use VS Code, it's recommended to install the Prettier extension to automatically format your code on save.

  • In order to have a nice changelog in the release section, please follow the Conventional Commits specification.

Setup Spacectl 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

This action installs the Spacectl CLI tool and adds it to the PATH.
v0.8.0

Verified

GitHub has manually verified the creator of the action as an official partner organization. For more info see About badges in GitHub Marketplace.

Tags

 (1)

Setup Spacectl 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.