Damien O'Hara
01/30/2023, 5:38 AMsourceFile
and call toYaml with addConsistencyCheck = false
. example:
val wf = workflow(
name = "test",
on = listOf(Push()),
sourceFile = Path("not-a-real-file")
) {
job("test", runsOn = RunnerType.UbuntuLatest) {
run(command = "echo 'Hello!'")
}
}
val yaml = wf.toYaml(addConsistencyCheck = false)
println(yaml)
Piotr Krzemiński
01/30/2023, 8:02 AMDamien O'Hara
01/30/2023, 8:05 AMgithub-workflows-kt
to handle the generation of YAML text and then handle the file side of things separatelyDamien O'Hara
01/30/2023, 8:09 AMcheck.yml
file generation:
1. https://github.com/mfwgenerics/markout/blob/a92bdd8/readme/src/main/kotlin/Main.kt#L11-L16
2. https://github.com/mfwgenerics/markout/blob/a92bdd8/readme/src/main/kotlin/workflows/Check.kt
here is the wrapper I'm using `github-workflows-kt`:
1. https://github.com/mfwgenerics/markout/blob/a3624b9/markout-github-workflows-kt/src/main/kotlin/io/koalaql/markout/Workflows.ktPiotr Krzemiński
01/30/2023, 8:10 AMPiotr Krzemiński
01/30/2023, 8:25 AMPiotr Krzemiński
01/30/2023, 8:28 AMPiotr Krzemiński
01/30/2023, 8:29 AMPiotr Krzemiński
01/30/2023, 8:57 AMsourceFile
optional
• add a way to opt out from using git to figure out the repository root (used to be able to call the Kotlin script from any directory within the repository)Damien O'Hara
01/30/2023, 9:21 AMsourceFile
to opt out of features that require it would be sufficient for mePiotr Krzemiński
01/30/2023, 9:22 AMtoYaml
- feel free to cut a ticket for it as well!Damien O'Hara
01/30/2023, 9:23 AMPiotr Krzemiński
01/30/2023, 9:23 AMDamien O'Hara
01/30/2023, 10:00 AMPiotr Krzemiński
01/30/2023, 10:27 AMDamien O'Hara
01/30/2023, 11:19 AMDamien O'Hara
01/30/2023, 2:11 PMPiotr Krzemiński
01/30/2023, 2:14 PMPiotr Krzemiński
02/01/2023, 7:48 AMPiotr Krzemiński
02/01/2023, 7:56 AMchange the Kotlin source and regenerate this YAML file
we can render the provided string under e.g. yamlModificationHint
argument and default to what we have now. Does it make sense to you?Damien O'Hara
02/01/2023, 9:22 AMPiotr Krzemiński
02/01/2023, 9:23 AMwriteToFile()
for consistencyPiotr Krzemiński
02/01/2023, 9:23 AMDamien O'Hara
02/01/2023, 9:25 AMPiotr Krzemiński
02/01/2023, 9:28 AMDamien O'Hara
02/03/2023, 6:15 AMPiotr Krzemiński
02/03/2023, 7:22 AMDamien O'Hara
02/03/2023, 7:25 AMPiotr Krzemiński
02/03/2023, 7:40 AM