-
-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Labels
enhancementNew feature or requestNew feature or request
Description
What feature do you need?
https://docs.github.com/en/enterprise-cloud@latest/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs#inputs-context
The access could be even type-unsafe for now (just strings).
Do you have an example usage?
run {
println(inputs["myInput"])
}
Is there a workaround for not having this feature? If yes, please describe it.
I'm currently doing something pretty ugly:
val githubContextJson = System.getenv("GHWKT_GITHUB_CONTEXT_JSON")!!
val version: String = Json.parseToJsonElement(githubContextJson)
.jsonObject["event"]
?.jsonObject?.get("inputs")
?.jsonObject?.get("version")
?.jsonPrimitive?.contentOrNull
?: error("Version couldn't be extracted from input")
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request