From 1b71cdb875b70c78235b0a45ed463ffb646d88de Mon Sep 17 00:00:00 2001 From: Victor Date: Fri, 15 Dec 2023 22:22:08 +0000 Subject: [PATCH] feat(lint): allow to specify node version --- lint/README.md | 1 + lint/action.yaml | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lint/README.md b/lint/README.md index f7ecf43..1f2de5e 100644 --- a/lint/README.md +++ b/lint/README.md @@ -43,6 +43,7 @@ This action runs the following lint checks: | --- | --- | --- | --- | | checkout-repo | Perform checkout as first step of action | `false` | true | | github-token | GitHub token that can create/delete comments. Usually - 'secrets.GITHUB_TOKEN' | `true` | | +| node-version | Node version to use | `false` | 18 | diff --git a/lint/action.yaml b/lint/action.yaml index bea9e38..c861400 100644 --- a/lint/action.yaml +++ b/lint/action.yaml @@ -8,6 +8,10 @@ inputs: github-token: required: true description: GitHub token that can create/delete comments. Usually - 'secrets.GITHUB_TOKEN' + node-version: + required: false + description: Node version to use + default: "18" runs: using: composite steps: @@ -18,7 +22,7 @@ runs: fetch-depth: 0 - uses: actions/setup-node@v4 with: - node-version: 18 + node-version: ${{ inputs.node-version }} - name: Run npm ci if needed if: hashFiles('package-lock.json') != '' shell: bash