Skip to main content

GitHub Action: setup-atmos

Install atmos for use in GitHub Actions

Introduction

This repo contains a GitHub Action to setup atmos for use in GitHub Actions. It installs the specified version of atmos and adds it to the PATH so it can be used in subsequent steps. In addition, it optionally installs a wrapper script that will capture the stdout, stderr, and exitcode of the atmos command and make them available to subsequent steps via outputs of the same name.

Usage

steps:
- uses: hashicorp/setup-terraform@v2

- name: Setup atmos
uses: cloudposse/github-action-setup-atmos@v2

To install a specific version of atmos, set the version input:

steps:
- uses: hashicorp/setup-terraform@v2

- name: Setup atmos
uses: cloudposse/github-action-setup-atmos@v2
with:
version: 0.15.0

The wrapper script installation can be skipped by setting the install-wrapper input to false:

steps:
- uses: hashicorp/setup-terraform@v2

- name: Setup atmos
uses: cloudposse/github-action-setup-atmos@v2
with:
install-wrapper: false

Subsequent steps of the GitHub action can use the wrapper scipt to capture the stdout, stderr, and exitcode if the wrapper script was installed:

steps:
- uses: hashicorp/setup-terraform@v2

- name: Setup atmos
uses: cloudposse/github-action-setup-atmos@v2
with:
install-wrapper: true

- name: Run atmos
id: atmos
run: atmos terraform plan

- run: echo ${{ steps.atmos.outputs.stdout }}
- run: echo ${{ steps.atmos.outputs.stderr }}
- run: echo ${{ steps.atmos.outputs.exitcode }}

Inputs

NameDescriptionDefaultRequired
atmos-versionVersion Spec of the version to use. Examples: 1.x, 10.15.1, >=10.15.0.latestfalse
install-wrapperFlag to indicate if the wrapper script will be installed to wrap subsequent calls of the atmos binary and expose its STDOUT, STDERR, and exit code as outputs named stdout, stderr, and exitcode respectively. Defaults to true.truefalse
tokenUsed to pull atmos distributions from Cloud Posse's GitHub repository. Since there's a default, this is typically not supplied by the user. When running this action on github.com, the default value is sufficient. When running on GHES, you can pass a personal access token for github.com if you are experiencing rate limiting.${{ github.server_url == 'https://github.com' && github.token || '' }}false

Outputs

NameDescription
atmos-versionThe installed atmos version.