Skip to content
Latchkey

GitHub Actions "add-path command is deprecated and disabled"

The "::add-path::" workflow command was deprecated for security and no longer modifies PATH. Steps relying on it fail to find tools added by an earlier step.

What this error means

A tool installed and "added to PATH" via ::add-path:: is not found in later steps, which fail with command not found.

github-actions
Warning: The `add-path` command is deprecated and will be disabled soon. Please upgrade to using Environment Files.

Common causes

Legacy ::add-path:: still in use

A step echoes "::add-path::", which the runner no longer honors, so PATH is never updated for subsequent steps.

How to fix it

Append to GITHUB_PATH instead

  1. Replace "::add-path::/dir" with "echo /dir >> $GITHUB_PATH".
  2. GITHUB_PATH changes apply to later steps, not the current one.
  3. Re-run and verify the tool resolves.
.github/workflows/ci.yml
- run: echo "${HOME}/.local/bin" >> "${GITHUB_PATH}"
- run: mytool --version

How to prevent it

  • Use GITHUB_PATH for all PATH modifications.
  • Update third-party actions past their add-path deprecation.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →