Live data from Hacker News

Run GitHub Actions locally

github.com

21–30 of 137 posts

Re: Run GitHub Actions locally

#21
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.

Re: Run GitHub Actions locally

#22
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…

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 updated often for some reason, I feel like it's better to just brute-force it - waiting for CI to run remotely.

Re: Run GitHub Actions locally

#23
I think this is really cool. We're tackling this problem from the other side by building `pixi` (pixi.sh) which bundles project / package management with a task runner so that any CI should be as simple as `pixi run test` and easy to execute locally or in the cloud.

Re: Run GitHub Actions locally

#24

WARNING: act is great if you use docker. Act does not support podman. Issues or discussions related to providing support/coverage/compatibility/workarounds for podman are closed with a terse message. Unusual for an open source project.

There's a long-open issue[1] for Podman support. Maybe they're just tired of dups?

[1] https://github.com/nektos/act/issues/303

Re: Run GitHub Actions locally

#26

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?

Re: Run GitHub Actions locally

#27
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.

Re: Run GitHub Actions locally

#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.

Re: Run GitHub Actions locally

#29
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.

Why dagger and not just... any language? (Nushell for example https://www.nushell.sh/)

Re: Run GitHub Actions locally

#30
post #29
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.

Why dagger and not just... any language? (Nushell for example https://www.nushell.sh/ )

Because I'm typically building and running tests in containers in CI, which is what dagger is for.

nu is my default shell. Note that I am not talking about dagger shell. https://dagger.io/blog/a-shell-for-the-container-age-introdu...

Post reply on HN