> Wow, how did you implement that?
The current implementation looks as follows: the workflow script (.main.kts) can be run in two modes. In the first one (the "main" one, and the only one so far) it generates the YAML. Then, if we have a step that wants to run some Kotlin logic, the step runs the very same script, but in a different mode. See an example YAML
here. Using the env var, the script switches to the "run the Kotlin step" mode and thanks to the well-defined value of the env var, it knows which step from which job to run.
I'm open to any other suggestions on how to implement it better. The current implementation has pros and cons, it's also a bit hacky given the API of the DSL. It was pretty simple to implement, so I went ahead with it 🙂 I'm especially interested in how Gradle works internally.
> Does it require Kotlin to be installed in whatever is running the steps?
Sure, but fortunately
Kotlin comes preinstalled on the GitHub Actions workers anyway.