thinking of adding a utility for multi workflow ou...
# github-workflows-kt
n
thinking of adding a utility for multi workflow outputs, could use arguments passed to the script to have it print out the correct workflow and without args it will just write all the yaml files
p
Sounds interesting, happy to see a PoC :)
n
thinks this needs to happen as a PR though as it needs to modify how the script is invoked in the self-verification.. i will try to do that over the next days/week
👍 1
i made this a function that you pass
*args
into it decides whether to write the workflows or print out the yaml of a specific workflow the consistency check now looks like so:
Copy code
run: |
  diff -u '.github/workflows/some_workflow_1.yaml' \
  <('.github/workflows/some_workflow.main.kts' 'Test workflow 1')
the multiple lines ONLY because detekt throws a fit otherwise.. because the line in the multiline string in the tests would be too long
to test it i also added a few helpers like capturing stdout and stderr.. and the tests write to
build/
and check the content of the files..
you use it like so:
Copy code
writeWorkflows(
    addConsistencyCheck = true,
    workflows = listOf(
        workflow
    ),
    args
)
p
thanks, will take a look within a few days, busy time here