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

"sudo" unnecessary and actually not present on Ubuntu in GitHub Actions currently #83

Closed
mohawk2 opened this issue Nov 3, 2020 · 9 comments
Assignees

Comments

@mohawk2
Copy link

mohawk2 commented Nov 3, 2020

Doing sudo on the apt-get commands did not work today, rather unexpectedly. It seems to work fine by omitting the sudo. See https://github.com/graphviz-perl/GraphViz2/runs/1348271077?check_suite_focus=true for the results, and apparently this is since Jun: nektos/act#269

kamiazya added a commit that referenced this issue Nov 4, 2020
kamiazya added a commit that referenced this issue Nov 4, 2020
@kamiazya
Copy link
Member

kamiazya commented Nov 4, 2020

Thank you for the report.

I'll consider improvement methods while experimenting.

@kamiazya kamiazya self-assigned this Nov 4, 2020
@mohawk2
Copy link
Author

mohawk2 commented Nov 5, 2020

Unfortunately this is still failing: https://github.com/graphviz-perl/GraphViz2/runs/1358650761

@mohawk2
Copy link
Author

mohawk2 commented Nov 5, 2020

Sorry for false report; the above was using @v1 which obviously hasn't changed. Could you tag @v2 or similar?

@kamiazya
Copy link
Member

kamiazya commented Nov 5, 2020

@mohawk2
This issue has not been resolved yet and we are considering a solution.

I ran CI by specifying the release / v1 branch, but it failed.
I got a Permission Denied error because I don't have sudo.

https://github.com/kamiazya/setup-graphviz-example/runs/1350519652?check_suite_focus=true


In the CI execution log that was first reported, commands other than sudo apt-get ... are being executed, and I think it is necessary to identify the cause.

add_GitHub_actions_·_graphviz-perl_GraphViz2_2d044d4

And this was the same command running in actions/checkout@v2.

@mohawk2
Copy link
Author

mohawk2 commented Nov 6, 2020

On further research, I think that sudo is needed when running on the main Ubuntu host, but is not needed or present when running in a container.

An immediate improvement that could be made would be to console.error any error that is caught before then trying to do setFailed. That might shed some extra light?

As for your point above, the actions/checkout@v2 was working fine, so I'm not sure that is worth looking at further?

@mohawk2
Copy link
Author

mohawk2 commented Feb 10, 2021

On further reflection: why not have a with: option of sudo, which defaults to true, and controls whether the commands are attempted with sudo? That seems to be a somewhat widely-used convention, as well.

@kamiazya
Copy link
Member

Sorry for leaving it so long.

I made it possible to install with sudo on Linux.

@kamiazya
Copy link
Member

@all-contributors please add @mohawk2 for bug, ideas

@allcontributors
Copy link
Contributor

@kamiazya

I've put up a pull request to add @mohawk2! 🎉

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