Skip to content

pnpm cache

pnpm cache #199

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@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
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@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: ${{ steps.pnpm-cache.outputs.store }}
key: ${{ runner.os }}-pnpm-store-cache-${{ steps.pnpm-cache.outputs.date }}