[Core feature request] Add support to Workflow Dispatch Inputs
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 35/100
Rechercherichtung
Start with GitHub's workflow_dispatch inputs syntax and the existing WorkflowDispatch/Input usage shown in the issue. Trace how workflow triggers and environment expressions are modeled, then compare generated output with the linked kotest example. Done means callers can declare and reference dispatch inputs without the event.inputs workaround.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Discussed in Kotlin's Slack: https://app.slack.com/client/T09229ZC6/C02UUATR7RC/thread/C02UUATR7RC-1682902161.628869
What feature do you need?
Workflows Dispatch Inputs:
https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onworkflow_dispatchinputs
Do you have an example usage?
env:
RELEASE_VERSION: ${{ inputs.version }}
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }}
GRADLE_OPTS: -Dorg.gradle.configureondemand=true -Dorg.gradle.parallel=false -Dkotlin.incremental=false -Dorg.gradle.jvmargs="-Xmx3g -XX:MaxMetaspaceSize=756m -XX:MaxPermSize=2048m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8"
Is there a workaround for not having this feature? If yes, please describe it.
Yes. One can use WorkflowDispatch normally, and use expr { github["event.inputs.XXXX"]!! } to get the value when they need it.
workflow(
name = "Publish",
on = listOf(
WorkflowDispatch(
mapOf("RELEASE_VERSION" to Input("The release version", true, String))
)
),
sourceFile = __FILE__.toPath(),
env = linkedMapOf(
"OSSRH_USERNAME" to expr { OSSRH_USERNAME },
"OSSRH_PASSWORD" to expr { OSSRH_PASSWORD },
"ORG_GRADLE_PROJECT_signingKey" to expr { ORG_GRADLE_PROJECT_signingKey },
"ORG_GRADLE_PROJECT_signingPassword" to expr { ORG_GRADLE_PROJECT_signingPassword },
"RELEASE_VERSION" to expr { github["event.inputs.version"]!! }
)
)
- Vorherrschende Sprache
- Kotlin
- Sterne
- 664
- Forks
- 30
- Ø Merge
- 4 T. 19 Std.
- Gemergte PRs (30 T.)
- 5
Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus typesafegithub/github-workflows-kt
-
bug
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 58/100
typesafegithub/github-workflows-kt#2389 · 7 Kommentare ·
-
bug
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 42/100
typesafegithub/github-workflows-kt#2368 · 1 Kommentar ·
-
problem
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 42/100
typesafegithub/github-workflows-kt#2348 · 2 Kommentare ·
-
operational
typesafegithub/github-workflows-kt#1884 · 1 zugewiesene Person ·
-
problem
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 30/100
typesafegithub/github-workflows-kt#1864 · 5 Kommentare ·
Alle Issues in typesafegithub/github-workflows-kt
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
-
Good First Issue
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
ankidroid/Anki-Android#21942 ·
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
libre-tube/LibreTube#8781 · 1 Kommentar ·
-
enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
MetrolistGroup/Metrolist#4396 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100