name: Prepare pnpm cache on: push: paths: - .github/workflows/prepare-pnpm-cache.yml - package.json - pnpm-lock.yaml concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/prod' }} jobs: prepare: if: github.repository_owner == 'modrinth' runs-on: blacksmith-2vcpu-ubuntu-2404 steps: - name: Checkout uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Setup Node uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 with: node-version-file: .nvmrc - name: Enable Corepack run: corepack enable - name: Get pnpm store path id: pnpm-store run: echo "store-path=$(pnpm store path --silent)" >> $GITHUB_OUTPUT - name: Cache pnpm uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 with: path: ${{ steps.pnpm-store.outputs.store-path }} key: pnpm-cache-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('**/pnpm-lock.yaml') }} - name: Install dependencies run: pnpm recursive install --frozen-lockfile