Skip to content

Setup Astro CLI

Actions
Installs the Astro CLI for use in subsequent steps or actions
v0.0.1
Latest
Verified creator
Star (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.

Setup Astro CLI

This GitHub action installs the Astro CLI for use in subsequent steps or actions.

This action is maintained separately from deploy-action to:

  • Decouple CLI installation from deployment logic
  • Allow users to control CLI versions independently across workflows
  • Simplify upgrade paths for the CLI in CI/CD environments (Dependabot-compatible)
  • Enable reuse of a single CLI installation across multiple deploy steps

Use this action

To use this action, add it as a step in your GitHub Actions workflow before any step that requires the Astro CLI. For example:

  1. Add the action to your workflow, e.g. astronomer/setup-astro-cli@v0.0.1.
  2. Optionally configure the version or download-url inputs to control which CLI binary is installed.
  3. Run subsequent steps that call the astro CLI — it will be available in PATH.

Configuration options

The following table lists the configuration options for the Setup Astro CLI action.

Name Default Description
version "" (latest) The desired Astro CLI version to install. Example: 1.40.1 or v1.40.1. Defaults to the latest version.
download-url "" Direct URL to download the Astro CLI binary. Supports both raw binaries and .tar.gz archives. When set, bypasses the standard installer.

Outputs

The following table lists the outputs for the Setup Astro CLI action.

Name Description
cli-version The version of the Astro CLI that was installed or found
cli-path The absolute path to the Astro CLI binary

CLI resolution order

The action resolves the Astro CLI using the following priority:

  1. astro already in PATH — use the pre-installed CLI, no download performed
  2. download-url input — download the binary directly to ~/.local/bin
  3. Standard installer — download via godownloader.sh into ~/.local/bin

Workflow file examples

In the following example, the action installs the latest Astro CLI and then deploys an Astro project. This is the most common usage pattern.

steps:
- name: Install Astro CLI
  uses: astronomer/setup-astro-cli@v0.0.1

- name: Deploy to Astro
  uses: astronomer/deploy-action@v0.12.0
  with:
    deployment-id: <deployment-id>

Pin to a specific CLI version

In the following example, a specific CLI version is pinned via the version input, which is useful when a deployment step requires a minimum CLI version.

steps:
- name: Install Astro CLI
  uses: astronomer/setup-astro-cli@v0.0.1
  with:
    version: "1.29.0"

- name: Deploy to Astro
  uses: astronomer/deploy-action@v0.12.0
  with:
    deployment-id: <deployment-id>

Use an internal mirror or air-gapped runner

In the following example, the CLI binary is downloaded from an internal mirror instead of GitHub Releases. This is useful for runners without public internet access.

steps:
- name: Install Astro CLI
  uses: astronomer/setup-astro-cli@v0.0.1
  with:
    download-url: https://mirror.example.com/astro-cli/v1.29.0/astro_linux_amd64.tar.gz

- name: Deploy to Astro
  uses: astronomer/deploy-action@v0.12.0
  with:
    deployment-id: <deployment-id>

Install once, deploy to multiple environments

In the following example, the CLI is installed once and reused across two separate deploy steps, avoiding redundant downloads in the same job.

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
    - name: Install Astro CLI
      uses: astronomer/setup-astro-cli@v0.0.1

    - name: Deploy to Development
      uses: astronomer/deploy-action@v0.12.0
      with:
        deployment-id: <dev-deployment-id>

    - name: Deploy to Staging
      uses: astronomer/deploy-action@v0.12.0
      with:
        deployment-id: <staging-deployment-id>

Deploy a DBT project and DAGs

In the following example, the CLI is installed once and used to deploy both a DBT project and DAGs from the same repository.

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
    - name: Install Astro CLI
      uses: astronomer/setup-astro-cli@v0.0.1
      with:
        version: "1.30.0"  # DBT deploys require CLI >= 1.28.1

    - name: Deploy DBT project
      uses: astronomer/deploy-action@v0.12.0
      with:
        deployment-id: <deployment-id>
        deploy-type: dbt
        root-folder: dbt

    - name: Deploy DAGs
      uses: astronomer/deploy-action@v0.12.0
      with:
        deployment-id: <deployment-id>
        root-folder: astro-project

Setup Astro CLI 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

Installs the Astro CLI for use in subsequent steps or actions
v0.0.1
Latest

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 Astro CLI 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.