Skip to content
Latchkey

helmfile "command not found" on the runner in CI

The shell could not find a helmfile executable on PATH. GitHub-hosted runners do not ship helmfile, so a helmfile apply step fails with exit code 127 until you install the binary in an earlier step.

What this error means

A step running helmfile apply or helmfile sync fails with "helmfile: command not found" and "Process completed with exit code 127", even though helm may already be present.

Terminal
/home/runner/work/_temp/script.sh: line 1: helmfile: command not found
Error: Process completed with exit code 127.

Diagnose it: render the chart before you install it

Most Helm failures are visible in the rendered manifests. Template them locally with the same values CI uses and you will usually see the problem without touching the cluster.

Terminal
# what will actually be applied
helm template <release> <chart> -f values.ci.yaml | head -60

# validate against the live cluster schema without installing
helm install <release> <chart> -f values.ci.yaml --dry-run --debug

# what state is the release actually in?
helm history <release>
helm status <release>

Common causes

helmfile is not preinstalled on hosted runners

GitHub-hosted images bundle kubectl and sometimes helm, but not helmfile. Without an install step the binary is absent.

The binary was installed to a directory not on PATH

A manual download extracted helmfile somewhere like the workspace root without adding it to PATH, so the shell cannot resolve it.

How to fix it

Install helmfile with a setup action

Use a dedicated action that also wires up helm and the helm-diff plugin that helmfile needs.

.github/workflows/ci.yml
- uses: helmfile/helmfile-action@v2
  with:
    helmfile-args: apply

Download the release binary onto PATH

  1. Fetch the helmfile release archive for linux-amd64.
  2. Move the extracted binary into a directory already on PATH such as /usr/local/bin.
  3. Run helmfile version to confirm it resolves before apply.
Terminal
curl -fsSL -o helmfile.tgz \
  https://github.com/helmfile/helmfile/releases/download/v0.169.0/helmfile_0.169.0_linux_amd64.tar.gz
tar -xzf helmfile.tgz helmfile
sudo mv helmfile /usr/local/bin/
helmfile version

How to prevent it

  • Install helmfile explicitly in CI; do not assume the runner has it.
  • Install helm, kubectl, and the helm-diff plugin in the same setup step.
  • Pin the helmfile version so the toolchain is reproducible across runs.

Frequently asked questions

What causes helmfile "command not found" on the runner in CI?
There are 2 common causes: helmfile is not preinstalled on hosted runners and the binary was installed to a directory not on path. GitHub-hosted images bundle kubectl and sometimes helm, but not helmfile.
How do I fix helmfile "command not found" on the runner in CI?
There are 2 fixes depending on which cause you have: install helmfile with a setup action and download the release binary onto path. Work through them in order, since the first is the most common.
What does helmfile "command not found" on the runner in CI actually mean?
A step running helmfile apply or helmfile sync fails with "helmfile: command not found" and "Process completed with exit code 127", even though helm may already be present.
How do I stop helmfile "command not found" on the runner in CI happening again?
Install helmfile explicitly in CI; do not assume the runner has it. The prevention section lists 3 changes that keep it from recurring.

Related guides

References

Not every red build is your code. Latchkey repairs the ones that are not, on the runner. Start free → 30-day trial · No credit card