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

Add Path is deprecated #28

Closed
potiuk opened this issue Oct 11, 2020 · 8 comments · Fixed by #29
Closed

Add Path is deprecated #28

potiuk opened this issue Oct 11, 2020 · 8 comments · Fixed by #29

Comments

@potiuk
Copy link

potiuk commented Oct 11, 2020

When we are using setup-kind in latest version we get warning about "add-path" being deprecated.

Apparently you are using core.addPath method which also uses it.

Add Path was deprecated in https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/ and will be removed soon, so I think you need to change the mechanism to the new mechanism:

The path should be added to the ${GITHUB_PATH} file instead as described in https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#adding-a-system-path :

echo "{path}" >> $GITHUB_PATH
potiuk added a commit to potiuk/setup-kind that referenced this issue Oct 11, 2020
Fixes engineerd#28

Fixes deprecation warning about "add-path".

Add Path was deprecated in
https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/
and will be removed soon, so this PR changes the mechanism to
the new one.

The path is added to the ${GITHUB_PATH} file instead as described in
https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#adding-a-system-path

: # Please enter the commit message for your changes. Lines starting
potiuk added a commit to potiuk/setup-kind that referenced this issue Oct 11, 2020
Fixes engineerd#28

Fixes deprecation warning about "add-path".

Add Path was deprecated in
https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/
and will be removed soon, so this PR changes the mechanism to
the new one.

The path is added to the ${GITHUB_PATH} file instead as described in
https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#adding-a-system-path

It also adds lib folder to the repository, so that we can use
the action using commit hashes which is the recommended way of
using actions. See:

https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/security-hardening-for-github-actions#using-third-party-actions
@stefanprodan
Copy link

@radu-matei any news on this? Seems that updating actions/core should fix it #27

@alexellis
Copy link

I also got this error today:

Run engineerd/[email protected]
7
downloading kind from https://github.com/kubernetes-sigs/kind/releases/download/v0.7.0/kind-linux-amd64
9
/bin/chmod +x /home/runner/work/_temp/e0399e89-4069-4a52-83f3-f7ecf6ad776e
10
Error: 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/
11
Executing kind with args create,cluster,--name,kind,--wait,300s
12
/opt/hostedtoolcache/kind/0.7.0/x64/kind create cluster --name kind --wait 300s
13
Creating cluster "kind" ...
14
 • Ensuring node image (kindest/node:v1.17.0) 🖼  ...

Is there anything we can do to help out with this?

@potiuk
Copy link
Author

potiuk commented Nov 9, 2020

We switched to our custom way of installing Kind via script :(

@stefanprodan
Copy link

stefanprodan commented Nov 11, 2020

Error: The add-path command is deprecated and will be disabled on November 16th.

So seems that on the 16th who ever uses KinD will end up with a broken CI 😢 I've used this action in a dozen places, all @fluxcd projects and many others are affected. Has anyone made a fork @potiuk ?

@pst
Copy link

pst commented Nov 11, 2020

I looked into this myself for Kubestack's pipelines. There's a KinD action from the helm team https://github.com/helm/kind-action But I haven't tried it yet. Just found it the other day.

@radu-matei
Copy link
Member

Apologies for missing this issue, I am looking into it and create a new release with the fix.

However, it looks like the action version will have to be explicitly updated by the user, unfortunately.

@radu-matei
Copy link
Member

Created a new release which uses the updated @actions/core package.

Feel free to reopen if there is any issue related to this change.

Thanks!

@potiuk
Copy link
Author

potiuk commented Nov 12, 2020

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants