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

collaborate with nektos/act for github action running #3585

Open
georgettica opened this issue May 6, 2021 · 9 comments
Open

collaborate with nektos/act for github action running #3585

georgettica opened this issue May 6, 2021 · 9 comments
Labels
actions core This issue is not accepting PRs from outside contributors enhancement a request to improve CLI

Comments

@georgettica
Copy link

Describe the feature or problem you’d like to solve

once we have github action files and we want to test them locally, we have no way to do it.

a solution that exists is https://github.com/nektos/act
maybe we should collaborate so it will land in some form in this official github repo

Proposed solution

this will shroten the cycle of coding github actions and make coding github actions easier

Additional context

NaN

@georgettica georgettica added the enhancement a request to improve CLI label May 6, 2021
@georgettica georgettica changed the title collaborate with nektos/act for github action collaborate with nektos/act for github action running May 6, 2021
@vilmibm vilmibm added actions core This issue is not accepting PRs from outside contributors labels May 18, 2021
@vilmibm
Copy link
Contributor

vilmibm commented May 18, 2021

Running actions locally is something we've discussed at length; we agreed that depending on docker would be ultimately too brittle and confusing. however, it looks like act is pretty cool and worth our investigation. I'd like to understand its design, advantages, and shortcomings as adopting it would be a very significant undertaking from a policy / code organization perspective.

@georgettica
Copy link
Author

I totally agree with you on that and understand that relying on docker can be unreliable.

So far I felt there were areas in which it can improve (I am not a maintainer there) but it's a cool tool that maybe could inspire you to something similar

@georgettica
Copy link
Author

georgettica commented May 25, 2021

@cplee @catthehacker

As people who are working on nektos/act act you comment aswell?

@catthehacker
Copy link

Currently it's far from perfect and many things are still incompatible comparing to GitHub Actions, I'd rather not recommend of implementing it in gh because of that and because I want to propose (quite a lot of) breaking changes in future but a "pingback" in README or something similar should be just fine so people can discover it 😸.

bonus thing 👀:
@jonico is going to present act on https://resources.github.com/webcasts/Summerfest-2021-South-Europe/

@cplee
Copy link

cplee commented May 26, 2021

The biggest challenge with act has been emulating the Actions runners inside containers. This presents a challenge given the size and complexity of tooling available on each runner. Additionally, supporting other platforms (e.g. Windows and MacOS) are non-trivial.

My suggestion would be to leverage the existing GH actions runners if possible. It would be awesome if i could do gh run and it would send up my current working directory up to a runner and then run the given job and pipe the output back to my local workstation. This would address the root problem of commit/push/pray loop that we have with actions. This would also offer perfect replication of the GH actions environment (since it'd run on a real runner).

@ChristopherHX
Copy link

My suggestion would be to leverage the existing GH actions runners if possible. It would be awesome if i could do gh run and it would send up my current working directory up to a runner and then run the given job and pipe the output back to my local workstation.

I implemented something like this in Runner.Client/gharun, replace gh run with the dotnet tool gharun and it start the official actions/runner with small modifications (to allow windows container, linux container on windows and macOS, removal of preprocessor directives like OS_WINDOWS).
The new full composite actions coming soon will just work by merging the changes of actions/runner

@georgettica
Copy link
Author

Nice!
I will take a look at this soon

@kichik
Copy link

kichik commented Jan 19, 2023

GitHub CLI has an extension API now. So I forked and released act as a ghcli extension.

$ gh ext install kichik/gh-act
$ gh act 
[CDK Deploy/Python package] 🚀  Start image=catthehacker/ubuntu:act-latest
[CDK Deploy/Node.js CI    ] 🚀  Start image=catthehacker/ubuntu:act-latest
[CDK Deploy/Python package]   🐳  docker pull image=catthehacker/ubuntu:act-latest platform= username= forcePull=false
...

@cplee
Copy link

cplee commented Jan 20, 2023

Thanks @kichik - great idea!

I've created a new repo nektos/gh-act that automatically releases a new GitHub CLI extension for act anytime a release of act is performed to keep them in sync. I've also updated the README.md with instructions for installing the extension.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
actions core This issue is not accepting PRs from outside contributors enhancement a request to improve CLI
Projects
None yet
Development

No branches or pull requests

6 participants