-
Notifications
You must be signed in to change notification settings - Fork 55
Add CLI questionnaire #54
Description
Similar to npm init, it could be a nice developer experience to interactively bootstrap an actions-toolkit action. Being asked by the CLI to give the action a name, description, icon, etc. could be a nice way to inform developers about the documented label metadata during the setup process.
This could use a library like inquirer or prompts to interactively prompt the user for input. We could default to what labels currently exist in the Dockerfile template if the user doesn't choose one, at least as a start.
actions-toolkit/bin/template/Dockerfile
Lines 13 to 19 in bb1535e
| # Labels for GitHub to read your action | |
| LABEL "com.github.actions.name"="Your action name" | |
| LABEL "com.github.actions.description"="A description of your action" | |
| # Here all of the available icons: https://feathericons.com/ | |
| LABEL "com.github.actions.icon"="play" | |
| # And all of the available colors: https://developer.github.com/actions/creating-github-actions/creating-a-docker-container/#label | |
| LABEL "com.github.actions.color"="gray-dark" |
We could also add a flag for skipping or answering yes to all prompts to bypass this flow.
Thoughts on this? Happy to spec this out more if you're interested / would like a PR but need more clarifying information.