diff --git a/.github/actions/node-install/action.yml b/.github/actions/node-install/action.yml new file mode 100644 index 000000000..92d02092a --- /dev/null +++ b/.github/actions/node-install/action.yml @@ -0,0 +1,33 @@ +name: 'Setup node and cache node_modules' +inputs: + node_version: + required: false + default: v18.x + +runs: + using: 'composite' + steps: + - name: Set up Node ${{ inputs.node_version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ inputs.node_version }} + + - name: Cache node modules + id: cache-npm + uses: actions/cache@v3 + env: + cache-name: cache-node-modules + with: + path: ~/.npm + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }} + + - name: Install dependencies + run: | + npm ci + npm run prisma:generate + env: + HUSKY: '0'