name: Yarn install description: "Install all NPM dependencies, caches them and restores if necessary" inputs: node_version: required: false default: v16.x runs: using: "composite" steps: - name: Use Node ${{ inputs.node_version }} uses: actions/setup-node@v3 with: node-version: ${{ inputs.node_version }} cache: "yarn" - name: node_modules cache id: node-modules-cache uses: actions/cache@v3 env: cache-name: node-modules-yarn cache-key: ${{ inputs.node_version }}-${{ hashFiles('yarn.lock', 'packages/prisma/schema.prisma') }} with: path: | **/node_modules/** packages/prisma/zod key: ${{ runner.os }}-${{ env.cache-name }}-${{ env.cache-key }} restore-keys: ${{ runner.os }}-${{ env.cache-name }}- - name: Yarn install shell: bash if: steps.node-modules-cache.outputs.cache-hit != 'true' run: | yarn install --prefer-offline --frozen-lockfile yarn prisma generate