Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

GHA Deprecation: "add-path" and "set-env"

See original GitHub issue

Issue Description

GitHub Actions is deprecating set-env and add-path due to a security risk:

Currently, the `setup-miniconda’ action has these lines:

$ grep setup-miniconda/ -nre "set-env"
setup-miniconda//dist/delete/index.js:577: *   ::set-env name=MY_VAR::some value
setup-miniconda//dist/delete/index.js:700:        command_1.issueCommand('set-env', { name }, convertedVal);
setup-miniconda//dist/setup/index.js:17524: *   ::set-env name=MY_VAR::some value
setup-miniconda//dist/setup/index.js:20008:        command_1.issueCommand('set-env', { name }, convertedVal);
$ grep setup-miniconda/ -nre "add-path"
setup-miniconda//dist/delete/index.js:722:        command_1.issueCommand('add-path', {}, inputPath);
setup-miniconda//dist/setup/index.js:20030:        command_1.issueCommand('add-path', {}, inputPath);

Which cause this warning when using it in a GHA workflow:

The `add-path` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see:
The `set-env` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see:

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:12 (7 by maintainers)

github_iconTop GitHub Comments

bollwyvlcommented, Oct 8, 2020

Looks like this is a duplicate of #78. #79 fixed this, we’ll be doing a release soon!

goanpecacommented, Nov 9, 2020

So can we close this now @bollwyvl 🙃 ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

GitHub Actions: Deprecating set-env and add-path commands
Patching your actions and workflows​​ 2.6 or greater to get the updated addPath and exportVariable functions. Action and workflow authors who are ...
Read more >
No way to set the ...
The path from "this is no longer correct" to "what is the right way to do it" is a little hazy at first....
Read more >
How to update the PATH in a github action workflow file for a ...
The add-path and set-env commands have been deprecated the 1st October 2020 for security reasons: ...
Read more >
Set environment variable - MATLAB setenv - MathWorks
This MATLAB function sets the value of an operating system environment variable.
Read more >
allowed-unsecure-commands - Semgrep
The environment variable `ACTIONS_ALLOW_UNSECURE_COMMANDS` grants this workflow permissions to use the `set-env` and `add-path` commands.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found