question-mark
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

GitHub Actions is deprecating set-env and add-path due to a security risk: https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/

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: https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/
The `set-env` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/

Issue Analytics

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

github_iconTop GitHub Comments

3reactions
bollwyvlcommented, Oct 8, 2020

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

2reactions
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 Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found