[Core feature request] Access workflow inputs in Kotlin-based step
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 42/100
Direzione di ricerca
Start by reading the linked GitHub Actions inputs context documentation, then trace how Kotlin-based workflow steps currently expose context and environment data. Implement access matching the example inputs["myInput"] and verify that workflow inputs are available without the JSON environment workaround.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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")
- Lingua principale
- Kotlin
- Stelle
- 664
- Fork
- 30
- Merge medio
- 4g 19h
- PR unite (30g)
- 5
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di typesafegithub/github-workflows-kt
-
bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 58/100
typesafegithub/github-workflows-kt#2389 · 7 commenti ·
-
bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 42/100
typesafegithub/github-workflows-kt#2368 · 1 commento ·
-
problem
Difficoltà 4/5 3-5 giorni Idoneità per principianti 42/100
typesafegithub/github-workflows-kt#2348 · 2 commenti ·
-
operational
typesafegithub/github-workflows-kt#1884 · 1 assegnatario ·
-
problem
Difficoltà 3/5 1-2 giorni Idoneità per principianti 30/100
typesafegithub/github-workflows-kt#1864 · 5 commenti ·
Tutte le issue di typesafegithub/github-workflows-kt
Issue simili
-
Bug Java Platform: Java
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
getsentry/sentry-java#6138 · 1 commento ·
-
Icon Requests Apertasupported
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
LawnchairLauncher/lawnicons#4100 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
Good First Issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
ankidroid/Anki-Android#21942 ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
libre-tube/LibreTube#8781 · 1 commento ·