Live data from Hacker News

Run GitHub Actions locally

github.com

41–50 of 137 posts

Re: Run GitHub Actions locally

#41
like a lot of folks i found nektos lacking. instead, i focused on keeping the gha workflows really light and putting any complexity in Task (taskfile.dev)—that way the meat of the workflows can be run locally, and the gha syntax is just the glue.

it works out very well.

Re: Run GitHub Actions locally

#42
Every mention of Github Actions is an occasion to start looking for the best alternative in , let's go!

Is Dagger usable yet? Is there still hope for Earthly? Are general purpose workflow systems winning any time soon, or are we still afraid of writing code? Any new systems out there that cover all the totally basic features like running locally, unlike Github Actions?

Re: Run GitHub Actions locally

#43
post #42

Every mention of Github Actions is an occasion to start looking for the best alternative in , let's go! Is Dagger usable yet? Is there still hope for Earthly? Are general purpose workflow systems winning any time soon, or are we still afraid of writing code? Any new systems out there that cover all the totally basic features like running locally, unlike Github Actions?

I think we could build something on top of nix that is as easy to use and powerful as earthly, but gets all the nice stuff from nix: reproducibility, caching, just use any command from any nix package, etc

Re: Run GitHub Actions locally

#45
post #7

In my experience (and as reflected by the comments on this post already), trying to run complex CI workflow locally is a fairly hopeless enterprise. If you have a fully containerized workflow, you might be able to get close, but even then ensuring you have all of your CI specific environment variables is often not a trivial task, and if your workflow orchestrates things across tasks (e.g. one task uploads an artifact…

For local development you can use .env files and mise. https://mise.jdx.dev/environments/#env-file

I use dagger to read these .env/mise env vars and inject dummy values into the test container. Production is taken care of with a secrets manager.

Re: Run GitHub Actions locally

#46
post #42

Every mention of Github Actions is an occasion to start looking for the best alternative in , let's go! Is Dagger usable yet? Is there still hope for Earthly? Are general purpose workflow systems winning any time soon, or are we still afraid of writing code? Any new systems out there that cover all the totally basic features like running locally, unlike Github Actions?

earthly is config-based, so it's in the same league as GHA in my book. https://docs.earthly.dev/docs/earthly-config

dagger is the only code-based solution. It works, but it does have some edges since it has a much bigger surface area and is constantly growing.

Re: Run GitHub Actions locally

#47
Dumb question, but why hasn’t GitHub made a solution that lets you run GitHub Actions locally? Or at the very least a solution that validates the action (giving a bit more certainty that it will succeed, a bit like a dry-run)?

(My war story:) I stopped using GHAs after an optimistic attempt to save myself five key strokes ‘r’ ‘s’ ‘p’ ‘e’ ‘c’ led to 40+ commits and seeing the sunrise but still no successful test run via GHA. Headless browsers can be fragile but the cost benefit ratio against using GHA was horrible, at least for an indy dev.

Re: Run GitHub Actions locally

#48
Back in the day we called that a shell script. We had this tool called Jenkins that would run the shell script in a new folder every time you pushed a change to gitlab. It was pretty neat.

Re: Run GitHub Actions locally

#49
post #47

Dumb question, but why hasn’t GitHub made a solution that lets you run GitHub Actions locally? Or at the very least a solution that validates the action (giving a bit more certainty that it will succeed, a bit like a dry-run)? (My war story:) I stopped using GHAs after an optimistic attempt to save myself five key strokes ‘r’ ‘s’ ‘p’ ‘e’ ‘c’ led to 40+ commits and seeing the sunrise but still no successful test run v…

Why would GitHub (a Microsoft service) want you to be less dependent on GitHub? That just makes the extinguishing part harder.

Re: Run GitHub Actions locally

#50
post #49
post #47

Dumb question, but why hasn’t GitHub made a solution that lets you run GitHub Actions locally? Or at the very least a solution that validates the action (giving a bit more certainty that it will succeed, a bit like a dry-run)? (My war story:) I stopped using GHAs after an optimistic attempt to save myself five key strokes ‘r’ ‘s’ ‘p’ ‘e’ ‘c’ led to 40+ commits and seeing the sunrise but still no successful test run v…

Why would GitHub (a Microsoft service) want you to be less dependent on GitHub? That just makes the extinguishing part harder.

[deleted]
Post reply on HN