github-workflows-kt icon indicating copy to clipboard operation
github-workflows-kt copied to clipboard

No possibility to override built-in keys

Open Vampire opened this issue 2 years ago • 2 comments

To work-around #288 I tried different things to get an own uses value. One of the things I tried was

_customArguments = mapOf(
    "uses" to StringCustomValue("./")
)

which resulted in a duplicate key error.

It would be nice if keys from _customArguments could override built-in keys for working-around cases not covered by the DSL yet.

Vampire avatar Jun 17 '22 17:06 Vampire

Yep, totally agree. Actually it looks like a bug to me.

krzema12 avatar Jun 17 '22 17:06 krzema12

See https://github.com/krzema12/github-actions-kotlin-dsl/issues/80#issuecomment-1200504222, it will be fixed in scope of that task.

krzema12 avatar Jul 31 '22 21:07 krzema12

After addressing #80, it now works properly. See e.g. this test for jobs:

https://github.com/krzema12/github-actions-kotlin-dsl/blob/9f803d557aa073c9dc35f6ecdc70807726cfe55f/library/src/test/kotlin/it/krzeminski/githubactions/yaml/JobsToYamlTest.kt#L273-L308

krzema12 avatar Aug 14 '22 22:08 krzema12