From 05e9d5220c20c1b428d6008c5716ec097632d5ae Mon Sep 17 00:00:00 2001 From: Luis Beu Date: Thu, 5 Oct 2023 18:13:37 +0200 Subject: [PATCH] Fix input syntax (#6) * Fix input syntax * Fix input syntax --- .github/workflows/environment-setup.yml | 14 +++------- .github/workflows/github-npm-publish.yml | 7 ++--- .github/workflows/internal-linting.yml | 2 +- .github/workflows/npm-node-qa-testing.yml | 7 ++--- .github/workflows/npm-publish.yml | 7 ++--- README.md | 34 +++++++++++------------ makefile | 2 +- 7 files changed, 29 insertions(+), 44 deletions(-) diff --git a/.github/workflows/environment-setup.yml b/.github/workflows/environment-setup.yml index 95ae61d..1d66659 100644 --- a/.github/workflows/environment-setup.yml +++ b/.github/workflows/environment-setup.yml @@ -4,18 +4,12 @@ inputs: package_manager: default: npm - description: Package manager to use - options: - - npm - - bun - type: choice + description: Package manager to use. Can be 'npm' or 'bun' + type: string dependencies_type: default: prod - description: Dependencies type to install - options: - - prod - - dev - type: choice + description: Dependencies type to install. Can be 'prod' or 'dev' + type: string node_version: description: Node version to setup default: "18" diff --git a/.github/workflows/github-npm-publish.yml b/.github/workflows/github-npm-publish.yml index 24e0bcc..8e19f32 100644 --- a/.github/workflows/github-npm-publish.yml +++ b/.github/workflows/github-npm-publish.yml @@ -13,11 +13,8 @@ type: string package_manager: default: npm - description: Package manager to use - options: - - npm - - bun - type: choice + description: Package manager to use. Can be 'npm' or 'bun' + type: string jobs: publish: diff --git a/.github/workflows/internal-linting.yml b/.github/workflows/internal-linting.yml index 4fb338d..d17ff96 100644 --- a/.github/workflows/internal-linting.yml +++ b/.github/workflows/internal-linting.yml @@ -23,4 +23,4 @@ jobs: with: go-version: stable - run: go install github.com/rhysd/actionlint/cmd/actionlint@latest - - run: actionlint --ignore "^unexpected key \"options\" for \"inputs at workflow_call event\" section\. expected one of .*" --ignore "^invalid value \"choice\" for input type of workflow_call event. it must be one of .*" + - run: actionlint diff --git a/.github/workflows/npm-node-qa-testing.yml b/.github/workflows/npm-node-qa-testing.yml index 808f13d..d48a55e 100644 --- a/.github/workflows/npm-node-qa-testing.yml +++ b/.github/workflows/npm-node-qa-testing.yml @@ -9,11 +9,8 @@ type: string package_manager: default: npm - description: Package manager to use - options: - - npm - - bun - type: choice + description: Package manager to use. Can be 'npm' or 'bun' + type: string format_command: description: Format command to run. Disabled by default default: diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 28f27b1..56785da 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -14,11 +14,8 @@ type: string package_manager: default: npm - description: Package manager to use - options: - - npm - - bun - type: choice + description: Package manager to use. Can be 'npm' or 'bun' + type: string secrets: NPM_TOKEN: description: NPM token with right access for publishing diff --git a/README.md b/README.md index 0b0c742..c87e54e 100644 --- a/README.md +++ b/README.md @@ -39,11 +39,11 @@ Publish a NPM package to the NPM registry. #### Inputs -| Name | Description | Type | Default | Required | -| ----------------- | --------------------------- | -------- | -------- | -------- | -| `dist_tag` | NPM dist tag to publish to. | `string` | `latest` | `false` | -| `node_version` | Node version to build on. | `string` | `18` | `false` | -| `package_manager` | Package manager to use. | `choice` | `npm` | `false` | +| Name | Description | Type | Default | Required | +| ----------------- | ---------------------------------------------- | -------- | -------- | -------- | +| `dist_tag` | NPM dist tag to publish to. | `string` | `latest` | `false` | +| `node_version` | Node version to build on. | `string` | `18` | `false` | +| `package_manager` | Package manager to use. Can be 'npm' or 'bun'. | `string` | `npm` | `false` | #### Secrets @@ -61,11 +61,11 @@ Publish a NPM package to the GitHub registry. #### Inputs -| Name | Description | Type | Default | Required | -| ----------------- | --------------------------- | -------- | ------- | -------- | -| `dist_tag` | NPM dist tag to publish to. | `string` | `` | `true` | -| `node_version` | Node version to build on. | `string` | `18` | `false` | -| `package_manager` | Package manager to use. | `choice` | `npm` | `false` | +| Name | Description | Type | Default | Required | +| ----------------- | ---------------------------------------------- | -------- | ------- | -------- | +| `dist_tag` | NPM dist tag to publish to. | `string` | `` | `true` | +| `node_version` | Node version to build on. | `string` | `18` | `false` | +| `package_manager` | Package manager to use. Can be 'npm' or 'bun'. | `string` | `npm` | `false` | #### Secrets @@ -121,7 +121,7 @@ Testing for node app using npm as package manager, libraries and components. | Name | Description | Type | Default | Required | | ---------------------- | ------------------------------------------------------------------- | --------- | -------------------------- | -------- | | `node_versions` | Node versions matrix to test on. | `string` | `['16.x', '17.x', '18.x']` | `false` | -| `package_manager` | Package manager to use. | `choice` | `npm` | `false` | +| `package_manager` | Package manager to use. Can be 'npm' or 'bun'. | `string` | `npm` | `false` | | `format_command` | Format command to run. To disable set to `''`. | `string` | `npm run format` | `false` | | `lint_command` | Lint command to run. To disable set to `''`. | `string` | `npm run lint` | `false` | | `build_command` | Build command to run. | `string` | `npm run build` | `false` | @@ -165,12 +165,12 @@ Checks out the commit, set up the node env and setup the package manager with ca #### Inputs -| Name | Description | Type | Default | Required | -| ------------------- | -------------------------------- | -------- | ---------------------------- | -------- | -| `node_versions` | Node versions matrix to test on. | `string` | `['16.x', '17.x', '18.x']` | `false` | -| `package_manager` | Package manager to use. | `choice` | `npm` | `false` | -| `dependencies_type` | Dependencies type to install. | `choice` | `prod` | `false` | -| `registry_url` | Registry url to use. | `string` | `https://registry.npmjs.org` | `false` | +| Name | Description | Type | Default | Required | +| ------------------- | ---------------------------------------------------- | -------- | ---------------------------- | -------- | +| `node_versions` | Node versions matrix to test on. | `string` | `['16.x', '17.x', '18.x']` | `false` | +| `package_manager` | Package manager to use. Can be 'npm' or 'bun'. | `string` | `npm` | `false` | +| `dependencies_type` | Dependencies type to install. Can be 'prod' or 'dev' | `string` | `prod` | `false` | +| `registry_url` | Registry url to use. | `string` | `https://registry.npmjs.org` | `false` | ## Directory structure and file naming diff --git a/makefile b/makefile index 0ef8962..59754c9 100644 --- a/makefile +++ b/makefile @@ -1,4 +1,4 @@ lint: @echo "Lint all yaml files in repository" yamllint . -s - actionlint --ignore "^unexpected key \"options\" for \"inputs at workflow_call event\" section\. expected one of .*" --ignore "^invalid value \"choice\" for input type of workflow_call event. it must be one of .*" \ No newline at end of file + actionlint \ No newline at end of file