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
- Replace "::add-path::/dir" with "echo /dir >> $GITHUB_PATH".
- GITHUB_PATH changes apply to later steps, not the current one.
- Re-run and verify the tool resolves.
.github/workflows/ci.yml
- run: echo "${HOME}/.local/bin" >> "${GITHUB_PATH}"
- run: mytool --versionHow to prevent it
- Use GITHUB_PATH for all PATH modifications.
- Update third-party actions past their add-path deprecation.
Related guides
GitHub Actions "set-output command is deprecated and disabled"Fix the GitHub Actions error where the legacy "::set-output::" workflow command no longer sets step outputs a…
GitHub Actions "set-env command is disabled for security"Fix the GitHub Actions error where the legacy "::set-env::" workflow command is disabled for security and mus…
GitHub Actions GITHUB_PATH append not taking effectFix the GitHub Actions issue where appending to GITHUB_PATH does not update PATH in the current step.