anyone else would like to be able to describe GitH...
# random
p
anyone else would like to be able to describe GitHub Actions workflows with a Kotlin DSL? type-safety, being able to extract common stuff to functions, and more - seems attractive to me, especially if the logic becomes complicated. I did some initial work here: https://github.com/krzema12/github-actions-kotlin-dsl, if you're interested, feel free to watch the effort and maybe contribute 🙂
đŸ™ŒđŸŒ 1
🙌 3
l
Super interested. I'd be happy to collaborate because editing that YAML manually is so annoying.
👍 2
p
Cool! I'll try to find find time to setup the CI and some tests for better collaboration
l
We can also pair-program those 😉
p
Sounds great, but I'm on limited resources here 😅 so for now we have to stay asynchronous
I encourage you to describe some of your real-life workflows with this DSL, see what's missing and how it works in general.
l
Does it support the
if
clauses at the moment?
BTW, I'm working on publishing to Maven Central so that it's easier for you to test
done, available under
it.krzeminski:github-actions-kotlin-dsl:0.1.0
🚀 1
a
would like to contribute in this as well. Pair program even
🚀 2
p
if you guys have any concrete ideas what we could work on, feel free to create issue(s) - always good to track stuff and have a discussion there 🙂 during weekend I did some work around internal quality (added some tests, linter, refactoring to make actions isolated)
I'm planning to work on https://github.com/krzema12/github-actions-kotlin-dsl/issues/7 next time I have time
also, please let me know once you start using it in your projects, would love to have a look at your workflows and how you expressed them with the DSL
I suppose the first issue that you'll face is missing mapping for some actions (existing actions are here), so feel free to send PRs that add them
v0.2.0 is out, with consistency check. That is, for such Kotlin script there's additional job generated that compares "expected" and "actual" YAML
any luck with giving this lib a try in your projects? 🙂
a
Is there some kind of guide to how I wire this whole thing up?
p
No, just an example in the "test-repo" I mentioned above. However, good point - I'll let you know once there's some piece of docs!
here, I polished the README, along with instructions how to add an example workflow: https://github.com/krzema12/github-actions-kotlin-dsl/blob/main/README.md any feedback appreciated!
working on adopting the library in a real-life project: https://github.com/krzema12/kotlin-python/pull/106
here's a dedicated channel for the library: #C02UUATR7RC