Live data from Hacker News

I'll think twice before using GitHub Actions again

ninkovic.dev

21–30 of 284 posts

Re: I'll think twice before using GitHub Actions again

#21

Not sure if I am missing something but you can definitely run (some?) GH actions locally with act: https://github.com/nektos/act Seen a couple posts on here say otherwise.

Act has limitations because GitHub Actions run via virtualization, while Act runs via containerization. This means that actions behave differently across the two platforms.

Re: I'll think twice before using GitHub Actions again

#22

Oh boy, there's a special kind of hell I enter into everytime I set up new github actions. I wrote a blog post a few months ago about my pain[0] but one of the main things I've found over the years is you can massively reduce how horrible writing github actions is by avoiding prebuilt actions, and just using it as a handy shell runner. If you write behaviour in python/ruby/bash/hell-rust-if-you-really-want and leave…

theoretically we could also use https://just.systems/ or https://mise.jdx.dev/ instead of directly calling gh actions but I haven't tried gh actions personally yet , If its really the nightmare you are saying , then that's sad.

Re: I'll think twice before using GitHub Actions again

#23

In the end, this is the age old "I built by thing on top of a 3rd party platform, it doesn't quite match my use case (anymore) and now I'm stuck". Would GitLab have been better? Maybe. But chances are that there is another edge case that is not handled well there. You're in a PaaS world, don't expect the platform to adjust to your workflow; adjust your workflow to the platform. You could of course choose to "step dow…

Doesn't everything in GitLab go into a single pipeline? GitHub at least makes splitting massive CI/CD setups easier by allowing you to write them as separate workflows that are separate files.

Re: I'll think twice before using GitHub Actions again

#25
I am biased because I built the rust SDK for dagger. But I think it is a real step forward for CI. Is it perfect? Nope. But it allows fixing a lot of the shortcomings the author has.

Pros:

- pipeline as code, write it as golang, python, typescript or a mix of thr above.

- Really fast once cached

- Use your languages library for code sharing, versioning and testing

- Runs everywhere local, ci etc. Easy to change from github actions to something else.

Cons:

- Slow on the first run. Lots of pulling of docker images

- The DSL and modules can feel foreign initially.

- Modules are definitely a framework, I prefer just building having a binary I can ship (which is why the rust SDK doesnt support modules yet).

- Doesn't handle large mono repos well, it relies heavily on caching and currently runs on a single node. It can work if you don't have 100 of services especially if the builder is a large machine.

Just the fact that you can actually write ci pipelines that can be tested, packaged, versioned etc. Allows us to ship our pipelines as products which is quite nice and something we've come to rely on heavily

Re: I'll think twice before using GitHub Actions again

#26
post #23

In the end, this is the age old "I built by thing on top of a 3rd party platform, it doesn't quite match my use case (anymore) and now I'm stuck". Would GitLab have been better? Maybe. But chances are that there is another edge case that is not handled well there. You're in a PaaS world, don't expect the platform to adjust to your workflow; adjust your workflow to the platform. You could of course choose to "step dow…

Doesn't everything in GitLab go into a single pipeline? GitHub at least makes splitting massive CI/CD setups easier by allowing you to write them as separate workflows that are separate files.

You can have pipelines trigger child pipelines in gitlab, but usability of them is pretty bad, viewing logs/results of those always needs extra clicking.

Re: I'll think twice before using GitHub Actions again

#27
post #5

> no way of running actions locally My policy is to never let pipeline DSLs contain any actual logic outside orchestration for the task, relying solely on one-liner build or test commands. If the task is more complicated than a one-liner, make a script for it in the repo to make it a one-liner. Doesn't matter if it's GitHub Actions, Jenkins, Azure DevOps (which has super cursed yaml), etc. This in turn means that you…

I don't understand why this is not the evident approach for everyone writing GitHub Actions/GitLab CI/CD yaml etc....

I've struggled in some teams to explained why it's better to extract your command in scripts (ShellCheck on it, scripts are simple to run locally etc...) instead of writing a Frankenstein of YAML and shell commands. I hope someday to find an authoritative guidelines on writing pipeline that promote this approach so at least I can point to this link instead of defending myself being a dinosaur!

Re: I'll think twice before using GitHub Actions again

#28
post #7

> GitHub doesn't care GitHub cares. GitHub cares about active users on their platform. Whether it's managing PRs, doing code reviews, or checking the logs of another failed action.

They don’t care about things that I care about, including everything the author talked about, and also things like allowing whitespace-ignore on diffs to be set on by default in a repo or per user - an issue that’s been open for half a decade now.

(Whitespace is just noise in a typescript repo with automatic formatting)

https://github.com/orgs/community/discussions/5486

Re: I'll think twice before using GitHub Actions again

#29

IMHO the main problem with GH Actions is that the runners are so slow. Feels like running your build on a frigging C64 sometimes ;)

Blacksmith is your buddy. Its free and just has better images for single-core operations. Unless you're Google, I can guarantee it's faster.

Re: I'll think twice before using GitHub Actions again

#30
Welcome to the jungle.

https://medium.com/@bitliner/why-gitlab-can-be-a-pain-ae1aa6...

I think it’s not only GitHub.

Ideally we should handle it as any other code, that is: do tests, handle multiple environments including the local environment, lint/build time error detection etc

Post reply on HN