-
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#64] Implement WorkflowDispatch inputs
- Loading branch information
Showing
3 changed files
with
121 additions
and
5 deletions.
There are no files selected for viewing
21 changes: 20 additions & 1 deletion
21
library/src/main/kotlin/it/krzeminski/githubactions/domain/triggers/WorkflowDispatch.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,22 @@ | ||
package it.krzeminski.githubactions.domain.triggers | ||
|
||
class WorkflowDispatch : Trigger() | ||
// https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onworkflow_dispatchinputs | ||
class WorkflowDispatch( | ||
val inputs: Map<String, Input> = emptyMap(), | ||
) : Trigger() { | ||
|
||
enum class Type { | ||
Choice, | ||
Environment, | ||
Boolean, | ||
String, | ||
} | ||
|
||
class Input( | ||
val description: String, | ||
val required: Boolean, | ||
val type: Type, | ||
val options: List<String> = emptyList(), | ||
val default: String? = null, | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters