Skip to content

Commit

Permalink
Use eq for outcome
Browse files Browse the repository at this point in the history
  • Loading branch information
krzema12 authored and Vampire committed Apr 18, 2024
1 parent 1b98bda commit 319454a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/test.main.kts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import io.github.typesafegithub.workflows.actions.vampire.SetupWslV1.Distributio
import io.github.typesafegithub.workflows.domain.CommandStep
import io.github.typesafegithub.workflows.domain.ActionStep
import io.github.typesafegithub.workflows.domain.JobOutputs.EMPTY
import io.github.typesafegithub.workflows.domain.AbstractResult.Status.Success
import io.github.typesafegithub.workflows.domain.RunnerType
import io.github.typesafegithub.workflows.domain.RunnerType.WindowsLatest
import io.github.typesafegithub.workflows.domain.Shell
Expand Down Expand Up @@ -1047,19 +1048,19 @@ fun JobBuilder<*>.verifyCommandResult(
val Step.successCondition
get() = """
always()
&& ($outcome == 'success')
&& (${outcome.eq(Success)})
""".trimIndent()

val Step.successOnAlpineCondition
get() = """
always()
&& ($outcome == 'success')
&& (${outcome.eq(Success)})
&& (matrix.distribution.user-id == 'Alpine')
""".trimIndent()

fun Step.getSuccessNotOnUbuntu2004Condition(i: Int) = """
always()
&& ($outcome == 'success')
&& (${outcome.eq(Success)})
&& (matrix.distributions.distribution$i.user-id != 'Ubuntu-20.04')
""".trimIndent()

Expand Down

0 comments on commit 319454a

Please sign in to comment.