From d181bfd1d3aedbbeb45d26ea3a7f4898b7558586 Mon Sep 17 00:00:00 2001 From: olivier Date: Mon, 27 Nov 2023 21:55:02 +0100 Subject: [PATCH] chore: add missing file --- .github/actions/setup-node/action.yml | 34 +++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/actions/setup-node/action.yml diff --git a/.github/actions/setup-node/action.yml b/.github/actions/setup-node/action.yml new file mode 100644 index 0000000000..4627f212fc --- /dev/null +++ b/.github/actions/setup-node/action.yml @@ -0,0 +1,34 @@ +name: Setup node_modules +description: Setup Node.js and install dependencies + +inputs: + working-directory: + description: 'working directory for yarn install' + default: ./ + required: false + +runs: + using: composite + steps: + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: 18.x + + - name: Cache dependencies + id: yarn-cache + uses: actions/cache@v3 + with: + path: | + **/node_modules + .yarn/install-state.gz + key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}-${{ hashFiles('**/package.json', '!node_modules/**') }} + restore-keys: | + ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }} + ${{ runner.os }}-yarn- + - name: Install dependencies + working-directory: ${{ inputs.working-directory }} + if: steps.yarn-cache.outputs.cache-hit != 'true' + run: yarn install --immutable --ignore-scripts + shell: bash +