Live data from Hacker News

Run GitHub Actions locally

github.com

31–40 of 137 posts

Re: Run GitHub Actions locally

#31

GitHub really needs to support local development with GitHub actions. Sheesh. What a step backwards.

> GitHub really needs to support local development with GitHub actions.

Agreed. I’m thankful for tools like act, but there really should be an officially supported way to run gh actions locally.

Re: Run GitHub Actions locally

#32
What are some recommended alternatives for act, if any?

I’ve been a long time user, but I’ve run into tons of problems with act over the last year and am wondering if there are better alternatives out there.

Re: Run GitHub Actions locally

#33

It's important to note that this tool does not use the same container images or runtime environment that GitHub Actions actually runs. It's an approximation. For simple use cases that won't matter, but if you have complex GitHub Actions you're bound to find varying behavior. That can lead to frustration when you're debugging bizarre CI failures.

AWS Lambda publishes Docker images (e.g. public.ecr.aws/lambda/python:3.12-arm64), does Github Actions have something similar?

https://github.com/actions/runner-images

Re: Run GitHub Actions locally

#34

I’ve been bedeviled by arm/intel/Mac issues with this. I want to be able to use this project, I really do. But it’s just not yet there, and this isn’t on Nektos. Nektos is, as best I understand it, trying to approximate GHA, but it’s not easy.

I've seen (but not used) this tool recently, which seems like it does a similar thing. Curious if it is any better experience.

https://github.com/bahdotsh/wrkflw

Re: Run GitHub Actions locally

#35
post #28

I try to do as much as possible in a (dagger) script and use the GHA to call it. That way I can test the script locally. I wonder if there is a proposal to support code-based actions. Config-based CI needs to die.

Yup. Every time there's one of these threads I renew my call for GHA to have hooks where in-band build tools like nix, bazel, dagger, and friends can propagate upward optimal information to be displayed in the web gui, in particular annotations and info about multiple tasks that run in parallel or series.

Re: Run GitHub Actions locally

#37

I would love for this to actually work, but apart from trivial workflows, it never replaced the dreaded game of CI ping/pong. My alternative was to have a dedicated repository where I can spam the Git and workflow run histories as much as I need to experiment with workflows.

[deleted]

Re: Run GitHub Actions locally

#38
anyone have any tips for testing actions locally, rather than workflows?

Despite the name, act is really only for the latter. You can try to test a local action by putting it in a workflow and calling that, but if you do a checkout in your workflow that will overwrite the mount of your local code into the act container, meaning you’ll get the version from the remote branch instead. Depending on the action, you may not be able to comment out the checkout step while testing.

Post reply on HN