diff --git a/.github/workflows/if-nodejs-pr-testing.yml b/.github/workflows/if-nodejs-pr-testing.yml index 27a4dbdc2..02ed7b61e 100644 --- a/.github/workflows/if-nodejs-pr-testing.yml +++ b/.github/workflows/if-nodejs-pr-testing.yml @@ -50,11 +50,15 @@ jobs: id: packagejson run: test -e ./package.json && echo "exists=true" >> $GITHUB_OUTPUT || echo "exists=false" >> $GITHUB_OUTPUT shell: bash + - if: steps.packagejson.outputs.exists == 'true' + name: Check package-lock version + uses: asyncapi/.github/.github/actions/get-node-version-from-package-lock@master + id: lockversion - if: steps.packagejson.outputs.exists == 'true' name: Setup Node.js uses: actions/setup-node@v3 with: - node-version: 14 + node-version: "${{ steps.lockversion.outputs.version }}" cache: 'npm' cache-dependency-path: '**/package-lock.json' - if: steps.packagejson.outputs.exists == 'true'