diff --git a/bin/create-action.js b/bin/create-action.js index ba0b2a9..71a5772 100755 --- a/bin/create-action.js +++ b/bin/create-action.js @@ -66,7 +66,8 @@ const getActionMetadata = async () => { type: 'autocomplete', name: 'icon', message: 'Choose an icon for your action. Visit https://feathericons.com for a visual reference.', - choices: icons + choices: icons, + limit: 10 }, { type: 'autocomplete', @@ -128,13 +129,7 @@ const createAction = async (argv) => { const directoryName = args._[0] if (!directoryName || args.help) { console.log(`\nUsage: npx actions-toolkit `) - process.exit(1) - // Although this return is unreachable, - // for some reason, code after this block is reached in unit tests, - // even while this calls `process.exit(1)`. - // Adding a `return` below fixes that issue in the tests. - // eslint-disable-next-line - return + return process.exit(1) } const base = path.join(process.cwd(), directoryName) try { diff --git a/bin/template/Dockerfile b/bin/template/Dockerfile index ae624f2..4f65fc5 100644 --- a/bin/template/Dockerfile +++ b/bin/template/Dockerfile @@ -13,7 +13,7 @@ FROM node:slim # Labels for GitHub to read your action LABEL "com.github.actions.name"=":NAME" LABEL "com.github.actions.description"=":DESCRIPTION" -# Here all of the available icons: https://feathericons.com/ +# Here are all of the available icons: https://feathericons.com/ LABEL "com.github.actions.icon"=":ICON" # And all of the available colors: https://developer.github.com/actions/creating-github-actions/creating-a-docker-container/#label LABEL "com.github.actions.color"=":COLOR" diff --git a/tests/__snapshots__/create-action.test.js.snap b/tests/__snapshots__/create-action.test.js.snap index e9c1fc1..92abb0d 100644 --- a/tests/__snapshots__/create-action.test.js.snap +++ b/tests/__snapshots__/create-action.test.js.snap @@ -16,7 +16,7 @@ FROM node:slim # Labels for GitHub to read your action LABEL "com.github.actions.name"="My Project Name" LABEL "com.github.actions.description"="A cool project" -# Here all of the available icons: https://feathericons.com/ +# Here are all of the available icons: https://feathericons.com/ LABEL "com.github.actions.icon"="anchor" # And all of the available colors: https://developer.github.com/actions/creating-github-actions/creating-a-docker-container/#label LABEL "com.github.actions.color"="blue"