this post was submitted on 20 Mar 2025
37 points (100.0% liked)

Programming

19061 readers
125 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities [email protected]



founded 2 years ago
MODERATORS
top 22 comments
sorted by: hot top controversial new old
[–] [email protected] 2 points 14 hours ago (1 children)

Actions are fine for very simple repos.

Gitlab CI is a dream, definitely my preference at work.

Jenkins can be okay or horrible depending on the setup.

[–] [email protected] 3 points 12 hours ago

What makes GitLab CI better than GitHub Actions in your eyes?

I've not extensively used either, and GitLab CI has been a while, but they felt pretty similar. I had put them into the same category.

We use Jenkins at work. I administrate it. For the most part, I find it horrendous.

[–] [email protected] 11 points 1 day ago (4 children)

Do formatting and linting and such autofix issues automatically as part of pre-commit checks. That way they don't end up as part of the CI.

[–] [email protected] 6 points 13 hours ago (1 children)

You need them in CI anyway to check people have actually done that, but yeah you definitely don't need to have CI automatically fix formatting and commit the fixes. That's crazy.

[–] [email protected] 1 points 13 hours ago* (last edited 13 hours ago) (1 children)

No, you don't.

To check if people have done what - committed? That's the only thing they need to do, and they'll stumble upon a roadblock immediately if the typecheck or lint fails.

Committing itself won't be possible... That's why we have automated pre-commit checks that don't depend on people remembering to do them manually.

[–] [email protected] 4 points 11 hours ago (1 children)

To check that people ran the pre-commit linters.

Committing itself won’t be possible

That's not how pre-commit hooks work. They're entirely optional and opt-in. You need CI to also run them to ensure people don't forget.

[–] [email protected] 1 points 9 hours ago (1 children)

They're optional if you make them optional. I didn't. You do as you please. 😄

[–] [email protected] 3 points 9 hours ago (1 children)

No, they're inherently optional in Git. There's no way to "check in" a git hook. You have to put in your README

Clone the repo and then please run pre-commit install! Oh and whatever you do don't git commit --no-verify!

You definitely need to actually check the lints in CI. It's very easy though, just add pre-commit run -a to your CI script.

[–] [email protected] 1 points 29 minutes ago

pre-commit also has a free service for open source GitHub repos too. They’ll even push an autofix commit for you if your tools are configured for it

[–] [email protected] 6 points 1 day ago (1 children)

Agreed. The idea of throwing code up at the CI and expecting it to fix my mistakes seems like a bad habit to me.

[–] [email protected] 5 points 1 day ago

Yep, I'd say so too. The moment I read the part about formatting in the CI, I thought to myself: I don't think GitHub Actions are the problem at hand. 😄

[–] [email protected] 2 points 1 day ago (1 children)

If it's open source I'd still add it, because a lot of people can't follow basic instructions.

[–] [email protected] 3 points 1 day ago (1 children)

They don't have to follow anything except try to commit their changes. Won't be possible even locally if linting or typechecking fail.

[–] [email protected] 1 points 26 minutes ago

Pre-commit hooks can’t be installed automatically and most people won’t even know they exist.

[–] [email protected] 3 points 1 day ago

This is the way. I do my checks on pre push because my team has a PR driven workflow. I also have an alias to run-tests && git push origin HEAD since my tests are expensive (minutes to run thousands of tests), and I didn't want that in a git hook.

[–] [email protected] 3 points 1 day ago (1 children)

The only good thing about Github Actions is the "marketplace" or that you can publish and find actions. The rest is just... not the way I'd do CI. I'm so glad I don't have to touch that anymore. Only thing worse than Github CI is Jenkins. *Shudder*

Anti Commercial-AI license

[–] [email protected] 3 points 15 hours ago (1 children)

You like the marketplace? I dislike it. Or at least its form. I appreciate that there is sharing of actions.

But I dislike having to navigate between repo and marketplace pages. I dislike that I have to assess who publishes them and inspect whether they and the code are trustworthy, and I have to assess risk or whether to copy or extract the relevant code. (And then you have to add and configure via text and magic strings and look up params elsewhere which of course is a consequence of the tech, not a fault of the marketplace itself.)

I feel it adds so much indirection and diffusion it's hard to do good trustworthy actions/code well. Which if course stands against it's usefulness of sharing workflows and actions. I know I'm more concerned and more thorough with that stuff than most people.

[–] [email protected] 1 points 14 hours ago

I like the concept. It helps with not having to rewrite the same stuff over and over again. It's like a package registry. Whether it's implemented well is debatable of course and it's understandable you don't like it.

Anti Commercial-AI license

[–] [email protected] 3 points 1 day ago (2 children)

Just self host an open source runner like woodpecker and you'll never have to move again

hell you can even self host github actions via act

[–] [email protected] 1 points 2 hours ago

Just self host an open source runner like woodpecker and you’ll never have to move again

How painful is the setup and general maintenance/security?

I'm considering the idea but I just don't want to deal with people abusing exploits in the actions that give them access to my LAN.

[–] [email protected] 3 points 11 hours ago

This. As someone who migrated an organization's repos from a self hosted Git server to GitHub (begrudgingly) and then back to a self hosted Git server again when it didn't meet the business needs ... emphatically this.

[–] [email protected] 3 points 1 day ago

Github actions and docker containers. A match made in heck.