github-workflows-kt
github-workflows-kt copied to clipboard
[Core feature request] Model `outcome` context
What feature do you need?
It would be nice if the GitHub contexts are modeled similar to the outputs of actions, so that you can easily access them.
https://docs.github.com/en/actions/learn-github-actions/contexts
For example what I need right now would be myActionStep.outcome
.
Do you have an example usage? YAML:
- run: if '${{ steps.execute_action.outcome }}' NEQ 'failure' exit 1
Current kts:
run(
command = """
if '${expr("steps.${executeActionStep.id}.outcome")}' NEQ 'failure' exit 1
""".trimIndent()
)
Intended kts:
run(
command = """
if '${expr(executeActionStep.outcome)}' NEQ 'failure' exit 1
""".trimIndent()
)
@jmfayard could you check what's missing in the lib after your recent contribution? So far I see "outcome" scope that @Vampire proposed to add.
Narrowing down to just supporting outcome
context since this one was requested, and we want to add support for other contexts in a lazy manner.