Live data from Hacker News

Run GitHub Actions locally

github.com

81–90 of 137 posts

Re: Run GitHub Actions locally

#81

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

Feel like the correct way to use any CI these days is to just have it do almost nothing. The CI just triggers a script. And then you can run that script locally.

exactly. I am surprised by the amount of comments in this and similar threads praying for github to add more complexity to an already over-complicated and fragile solution.

CI must be local-first and platform-agnostic.

Re: Run GitHub Actions locally

#82

Rather than tying CI & deployments to Github Actions, it is usually better to pull as much of it as possible out to shell scripts and call them in containers in GH actions.. There are optimizations you’ll want (caching downloaded dependencies etc); if you wait to make those after your build is CI-agnostic you’ll be less tempted by vendor specific shortcuts. Usually means more code - but, easier to test locally. Also,…

This is always the top comment in these kinds of threads, and I see this as an indication that the current state of CI/CD is pathetically propriety. It’s like the dark times before free and open source compilers. When are we going to push back and say enough is enough!? CI/CD desperately needs something akin to Kubernetes to claw back our control and ability to work locally. Personally, I’m fed up with pipeline devel…

We've had open source CI. We still have it. I remember ye olde days of Hudson, before it was renamed Jenkins. Lotsa orgs still use Jenkins all over the place, it just doesn't get much press. It predates GHA, Circle, and many of the popular cloud offerings.

Turns out CI/CD is not an easy problem. I built a short-lived CI product before containers were really much of a thing ...you can guess how well that went.

Also, I'll take _any_ CI solution, closed or open, that tries to be the _opposite_ of the complexity borg that is k8s.

Re: Run GitHub Actions locally

#83
I've been using this recently but there's many issues, and things that can only be tested remotely. In some cases I've had to guard steps if: ${{ !env.ACT }} so they don't run locally.

Re: Run GitHub Actions locally

#84

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 n…

I needed to do this recently, the only way I could find was with a proxy workflow.

Re: Run GitHub Actions locally

#85
post #5

Just this week I tried giving this another chance to debug some weird CI failures for ruby tests. I’m on M-series macs so there is an inherent platform mismatch. That coupled with us using depot images as action runners. I was never able to get it running past the dry-run stage. There is just a lot of differences between CI runners and my local docker images. I even gave the image from catthehacker a try. Which is li…

ChristopherHX publishes Docker images which are created directly from packing up the root filesystem into a tarball from inside a runner. The images are huge though.

https://github.com/ChristopherHX/runner-image-blobs/pkgs/con...

Re: Run GitHub Actions locally

#86
post #70
post #67

Earlier quoted context omitted.

GH Actions have always worked flawlessly for me, as long as I don't ever do anything unusual. Last week I moved from a custom server back to GH Pages + GH Actions, and broke a feature that depended on an out dir existing after one build phase and before another. I have no idea how to fix it. It's probably simple, I'm just burnt out.

Each job runs on a separate runner. If you want to pass data across, use artifacts to upload and then retrieve the specified file(s).

You can pass outputs between jobs by declaring one job as a dependency of another with needs:, then reference that dependency's outputs with needs..outputs

Re: Run GitHub Actions locally

#87
post #69
post #61

Earlier quoted context omitted.

How's Jenkins looking these days?

Seems fine to me, I don't really understand why people think CI is hard and they need to shop a different platform. All these systems are is a glorified shell script runner. It seems like developers just keep making up new DSLs over and over to do the same things.

I wish jenkins had a better config as code option. Not crazy about groovy and you still need to click in the UI to get some set up before you can use. Maybe im stuck with an old version or something

I mostly like Jenkins though, idk why people so desperately want to always move to something new. I guess I've never been on the maintenance side of running Jenkins for thousands of engineers though.

Re: Run GitHub Actions locally

#88
post #22

Earlier quoted context omitted.

Sounds similar to my own experiences trying to debug GH actions locally. I've tried twice now to get it working, pulling down many GBs of images and installing stuff and then getting stuck in some obscure configuration or environment issue. I was even running Linux locally which I figured would be the happiest path. I'm not eager to try again, and unless there's a CI that's very slow or GH actions that need to be upd…

There's another alternative - debug in CI itself. There's a few ways that you can pause your CI at a specific step and get a shell to do some debugging, usually via SSH. I've found that to be the most useful.

https://github.com/namespacelabs/breakpoint

Re: Run GitHub Actions locally

#89
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 has pivoted away from their CI/CD products: they’re shutting down Satellite, and they’re stopping active maintenance of the Earthly open source project.

https://earthly.dev/blog/shutting-down-earthfiles-cloud/

Re: Run GitHub Actions locally

#90
post #61
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?

How's Jenkins looking these days?

They use github actions

https://github.com/jenkinsci/jenkins/tree/master/.github/wor...

Post reply on HN