Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace deprecated 'set-env' with Environment Files in GitHub Actions #9541

Closed
prezha opened this issue Oct 23, 2020 · 1 comment · Fixed by #9542
Closed

replace deprecated 'set-env' with Environment Files in GitHub Actions #9541

prezha opened this issue Oct 23, 2020 · 1 comment · Fixed by #9542
Assignees
Labels
area/testing kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.

Comments

@prezha
Copy link
Contributor

prezha commented Oct 23, 2020

looking at github actions logs, there are (security vulnerability) warnings:

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/

additional details:

Patching your actions and workflows

If you are using self-hosted runners make sure they are updated to version 2.273.1 or greater.

Action authors who are using the toolkit should update the @actions/core package to v1.2.6 or greater to get the updated addPath and exportVariable functions.

Action and workflow authors who are setting environment variables via stdout should update any usage of the set-env and add-path workflow commands to use the new environment files.

Starting today runner version 2.273.5 will begin to warn you if you use the add-path or set-env commands. We are monitoring telemetry for the usage of these commands and plan to fully disable them in the future.

in /home/prezha/dev/k8s/minikube/github.com/prezha/minikube/.github/workflows/ there are a couple of yaml files using that:

  • iso.yml
  • kic_image.yml
  • master.yml
  • pr.yml

according to the format and the GitHub Actions: Deprecating set-env and add-path commands as well as referenced Environment Files, something like:

find . -type f -name "*.yml" -print0 | xargs -0 sed -i -r 's/echo ::set-env name=(.*)::(.*)/echo "\1=\2" >> $GITHUB_ENV/g'

also (picked up in try no. 2 - special for functional_docker_windows and functional_hyperv_windows):

find . -type f -name "*.yml" -print0 | xargs -0 sed -i -r 's/echo "::set-env name=(.*)::(.*)"/echo "\1=\2" >> $GITHUB_ENV/g'

and finally, fixing the multline strings in STAT results (picked up in try no. 3)

should cover all the cases and resolve the issue, but i'm not sure about those functional_docker_windows and functional_hyperv_windows that still fail (maybe windows need special env var treatment?)

@afbjorklund i guess you are the right/best person to turn to, and if so: can you please have a look?

@prezha
Copy link
Contributor Author

prezha commented Oct 23, 2020

/assign

@tstromberg tstromberg added area/testing kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. labels Oct 26, 2020
SvenRoederer added a commit to SvenRoederer/freifunk-berlin-firmware that referenced this issue Nov 18, 2020
ran "find . -type f -name "*.yml" -print0 | xargs -0 sed -i -r 's/echo "::set-env name=(.*)::(.*)"/echo "\1=\2" >> $GITHUB_ENV/g'"
according to kubernetes/minikube#9541
SvenRoederer added a commit to freifunk-berlin/firmware that referenced this issue Nov 18, 2020
looking at github actions logs, there are (security vulnerability) warnings:

> 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/

according to kubernetes/minikube#9541 running the following command to fix it:

find . -type f -name "*.yml" -print0 | xargs -0 sed -i -r 's/echo "::set-env name=(.*)::(.*)"/echo "\1=\2" >> $GITHUB_ENV/g'"
SvenRoederer added a commit to SvenRoederer/freifunk-berlin-firmware that referenced this issue Nov 22, 2020
looking at github actions logs, there are (security vulnerability) warnings:

> 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/

according to kubernetes/minikube#9541 running the following command to fix it:

find . -type f -name "*.yml" -print0 | xargs -0 sed -i -r 's/echo "::set-env name=(.*)::(.*)"/echo "\1=\2" >> $GITHUB_ENV/g'"
SvenRoederer added a commit to freifunk-berlin/firmware that referenced this issue Jan 13, 2021
looking at github actions logs, there are (security vulnerability) warnings:

> 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/

according to kubernetes/minikube#9541 running the following command to fix it:

find . -type f -name "*.yml" -print0 | xargs -0 sed -i -r 's/echo "::set-env name=(.*)::(.*)"/echo "\1=\2" >> $GITHUB_ENV/g'"
SvenRoederer added a commit to SvenRoederer/freifunk-berlin-firmware that referenced this issue May 8, 2021
looking at github actions logs, there are (security vulnerability) warnings:

> 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/

according to kubernetes/minikube#9541 running the following command to fix it:

find . -type f -name "*.yml" -print0 | xargs -0 sed -i -r 's/echo "::set-env name=(.*)::(.*)"/echo "\1=\2" >> $GITHUB_ENV/g'"
SvenRoederer added a commit to SvenRoederer/freifunk-berlin-firmware that referenced this issue May 8, 2021
looking at github actions logs, there are (security vulnerability) warnings:

> 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/

according to kubernetes/minikube#9541 running the following command to fix it:

find . -type f -name "*.yml" -print0 | xargs -0 sed -i -r 's/echo "::set-env name=(.*)::(.*)"/echo "\1=\2" >> $GITHUB_ENV/g'"
SvenRoederer added a commit to SvenRoederer/freifunk-berlin-firmware that referenced this issue May 8, 2021
looking at github actions logs, there are (security vulnerability) warnings:

> 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/

according to kubernetes/minikube#9541 running the following command to fix it:

find . -type f -name "*.yml" -print0 | xargs -0 sed -i -r 's/echo "::set-env name=(.*)::(.*)"/echo "\1=\2" >> $GITHUB_ENV/g'"
SvenRoederer added a commit to SvenRoederer/freifunk-berlin-firmware that referenced this issue May 8, 2021
looking at github actions logs, there are (security vulnerability) warnings:

> 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/

according to kubernetes/minikube#9541 running the following command to fix it:

find . -type f -name "*.yml" -print0 | xargs -0 sed -i -r 's/echo "::set-env name=(.*)::(.*)"/echo "\1=\2" >> $GITHUB_ENV/g'"
SvenRoederer added a commit to SvenRoederer/freifunk-berlin-firmware that referenced this issue May 29, 2021
looking at github actions logs, there are (security vulnerability) warnings:

> 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/

according to kubernetes/minikube#9541 running the following command to fix it:

find . -type f -name "*.yml" -print0 | xargs -0 sed -i -r 's/echo "::set-env name=(.*)::(.*)"/echo "\1=\2" >> $GITHUB_ENV/g'"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/testing kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants