This repository provides a GitHub Action that downloads and adds the Kargo CLI to the PATH for later steps in your workflow. The action pulls prebuilt binaries from the official akuity/kargo releases based on the operating system and CPU architecture of the runner.
Add the action to any job that needs the Kargo CLI. Provide the CLI version you want to install, then invoke Kargo commands in subsequent steps.
name: Use Kargo CLI
on:
workflow_dispatch:
jobs:
kargo-cli:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Kargo CLI
uses: aiell0/setup-kargo@v1
with:
version: "1.0.0"
# use-cache: "true" # optional
- name: Show version
run: kargo versionversion(required): Semantic version of the CLI to install. The action accepts values with or without the leadingv(e.g.1.0.0orv1.0.0).use-cache(optional, default"true"): Whentrue, the downloaded binary is stored using the GitHub Actions tool cache for reuse across workflow runs. Set to"false"to force a fresh download into a temporary directory each run.
- Normalizes the requested version to ensure it is prefixed with
v. - Detects the runner platform and architecture to select the correct release asset.
- Downloads the Kargo CLI binary from the GitHub release.
- Either caches the binary with the Actions tool cache or stores it in a temporary directory.
- Prepends the resulting directory to the
PATHso thatkargois available to later steps.
- Install dependencies with
npm install. - Build a fresh bundle with
npx rollup -cto updatedist/index.js. - Keep
dist/index.jscommitted so the action runs without a build step in GitHub Actions.
act pull_request --container-architecture linux/amd64 -W ci.yml