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

Adding GOBIN to PATH #6

Closed
francislavoie opened this issue Mar 20, 2020 · 3 comments
Closed

Adding GOBIN to PATH #6

francislavoie opened this issue Mar 20, 2020 · 3 comments

Comments

@francislavoie
Copy link

First, I just wanted to say, huge thanks for this repo/README, it helped me a ton. I've been working on setting up github actions for Caddy.

In your README, you note:

The setup-go action doesn't set PATH, so currently it's not possible to go install a program and run it directly. Until that's fixed, consider absolute paths like $(go env GOPATH)/bin/program.

I just wanted to point out that I figured out that you can just do this on any step after setup-go, pretty much entirely smoothes that issue over:

echo "::add-path::$(go env GOPATH)/bin"
@mvdan
Copy link
Owner

mvdan commented Mar 20, 2020

Yeah, I've seen similar magic before, but I initially preferred to stick to documented features :)

We can add it though, since there still isn't an official portable way to do this.

@mvdan mvdan closed this as completed in fc93475 Mar 20, 2020
@francislavoie
Copy link
Author

francislavoie commented Mar 21, 2020

Well, it is documented: https://help.github.com/en/actions/reference/workflow-commands-for-github-actions#adding-a-system-path and it works on all shells, not just bash.

Thanks for adding it to the README!

@mvdan
Copy link
Owner

mvdan commented Mar 21, 2020

Ah, my bad! It wasn't documented when I last looked :)

mvdan added a commit that referenced this issue Mar 21, 2020
Thanks to Francis Lavoie for pointing this out in #6.
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

No branches or pull requests

2 participants