Because it's clear to write and read. You don't want your CI/CD logic to end up being spaghetti because a super ninja engineer decided they can do crazy stuff just because they can. Same reason why it's a bad idea to create your infrastructure directly in a programming language (unless creating infrastructure is a core part of your software).
> Why not just build the workflows themselves as docker images? I guess running other docker images in the workflow would then become a problem.
That's how Drone CI handled it. GitLab kind of does the same, where you always start as a docker image, and thus if you have a custom one with an entrypoint, it does whatever you need it to.
YAML is fine for data, but inevitably stuff like workflows end up tacking on imperative features to a declarative language.
You can have conditions and types without having the full flexibility allowing madness of a full language with HCL.
I really really want to use dagger, but I don’t think there’s organizational interest in it.
Why not just build the workflows themselves as docker images? I guess running other docker images in the workflow would then become a problem.