https://kotlinlang.org logo
#feed
Title
# feed
p

Piotr Krzemiński

03/23/2022, 6:01 AM
Kotlin DSL for GitHub Actions workflows is getting more and more mature! Version 0.11.0 is out, with proper docs, ability to define custom attributes/inputs and more. If you use GitHub Actions and don't really like YAML, I encourage you to give it a shot. Any feedback greatly appreciated! https://github.com/krzema12/github-actions-kotlin-dsl/releases/tag/v0.11.0
👏 2
plus1 4
🆒 3
3
m

Matteo Mirk

03/23/2022, 7:22 AM
very cool, thanks! I’ll try to use it in our GH enterprise instance
1
👍 1
a

Abhi

03/23/2022, 7:30 AM
Cool stufff!
👍 1
m

mbonnin

03/23/2022, 11:24 AM
This is nice ❤️ . Could you somehow bundle that with a Github action that regenerates the yamls "automagically" so that I never have to touch yaml? (besides for this initial "bootstrap")? Then I'd just have
Copy code
.github/workflows/update-workflows.yaml
containing something like
Copy code
name: Update workflows
on:
  pull_request:
    paths:
      - .github/workflows-kt/**

jobs:
  update-workflows:
    uses: krzema12/update-workflows@v1
p

Piotr Krzemiński

03/23/2022, 11:28 AM
sure thing, you can create a workflow that "recompiles" the workflows to YAML 🙂 there's no dedicated support for it in the library, apart from
writeToFile()
function on
Workflow
object. I haven't myself yet automated YAML generation to that extent, but it's certainly doable. Please let me know once you have it working, then maybe we can document it in the library's docs for the convenience of others 🙂
👍 1
26 Views