Skip to content

pnpm cache

pnpm cache #126

Workflow file for this run

name: pnpm cache
on:
workflow_dispatch:
schedule:
# Run every day at 01:00 UTC
- cron: '0 1 * * *'
jobs:
create-cache:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
with:
node-version: '20'
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
- name: Get pnpm cache info
id: pnpm-cache
run: |
echo "store=$(pnpm store path)" >> $GITHUB_OUTPUT
echo "date=$(/bin/date -u "+%Y-%m-%d")" >> $GITHUB_OUTPUT
- name: pnpm install
run: pnpm install
- name: Save pnpm cache
uses: actions/cache/save@2cdf405574d6ef1f33a1d12acccd3ae82f47b3f2 # v4.1.0
with:
path: ${{ steps.pnpm-cache.outputs.store }}
key: ${{ runner.os }}-pnpm-store-cache-${{ steps.pnpm-cache.outputs.date }}