pnpm cache #61
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 | |
with: | |
node-version: '20' | |
- uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.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@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0 | |
with: | |
path: ${{ steps.pnpm-cache.outputs.store }} | |
key: ${{ runner.os }}-pnpm-store-cache-${{ steps.pnpm-cache.outputs.date }} |