cloudflare/kumo
Publicmirrored from https://github.com/cloudflare/kumoAvailable
.github/actions/install-dependencies/action.yml
39lines · modecode
| 1 | name: "Install Dependencies" |
| 2 | description: "Install pnpm, Node.js, and project dependencies" |
| 3 | |
| 4 | inputs: |
| 5 | filter: |
| 6 | description: "pnpm --filter value to scope install (e.g. '@cloudflare/kumo'). Omit for all packages." |
| 7 | required: false |
| 8 | |
| 9 | runs: |
| 10 | using: "composite" |
| 11 | steps: |
| 12 | - name: Install pnpm |
| 13 | uses: pnpm/action-setup@v4 |
| 14 | with: |
| 15 | version: 10.22.0 |
| 16 | |
| 17 | - name: Install Node.js |
| 18 | uses: actions/setup-node@v4 |
| 19 | with: |
| 20 | node-version: 24 |
| 21 | cache: "pnpm" |
| 22 | registry-url: "https://registry.npmjs.org" |
| 23 | |
| 24 | - name: Cache node_modules |
| 25 | uses: actions/cache@v4 |
| 26 | with: |
| 27 | path: "**/node_modules" |
| 28 | key: ${{ runner.os }}-node_modules-${{ hashFiles('**/pnpm-lock.yaml') }} |
| 29 | restore-keys: | |
| 30 | ${{ runner.os }}-node_modules- |
| 31 | |
| 32 | - name: Install dependencies |
| 33 | shell: bash |
| 34 | run: | |
| 35 | if [ -n "${{ inputs.filter }}" ]; then |
| 36 | pnpm install --frozen-lockfile --filter "${{ inputs.filter }}" |
| 37 | else |
| 38 | pnpm install --frozen-lockfile |
| 39 | fi |
| 40 | |