-
-
Notifications
You must be signed in to change notification settings - Fork 24
/
WorkflowDispatch.kt
37 lines (30 loc) · 1001 Bytes
/
WorkflowDispatch.kt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package io.github.typesafegithub.workflows.domain.triggers
import kotlinx.serialization.Contextual
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
// https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onworkflow_dispatchinputs
@Serializable
public data class WorkflowDispatch(
val inputs: Map<String, Input> = emptyMap(),
override val _customArguments: Map<String, @Contextual Any> = mapOf(),
) : Trigger() {
@Serializable
public enum class Type {
@SerialName("choice")
Choice,
@SerialName("environment")
Environment,
@SerialName("boolean")
Boolean,
@SerialName("string")
String,
}
@Serializable
public class Input(
public val description: String,
public val required: Boolean,
public val type: Type,
public val options: List<String> = emptyList(),
public val default: String? = null,
)
}