Skip to content

Commit

Permalink
Merge branch 'master' of github.com:alexpresthus/DefinitelyTyped
Browse files Browse the repository at this point in the history
  • Loading branch information
alexpresthus committed Nov 1, 2023
2 parents 8ead0aa + c859a69 commit b784555
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 13 deletions.
23 changes: 10 additions & 13 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,17 @@ jobs:
- uses: pnpm/action-setup@v2

# TODO(jakebailey): this won't work in PRs; we may need to once nightly
# refresh a new cache based on master, and then consume it here read-only in PRs.
# - name: Get pnpm cache info
# id: pnpm-cache
# shell: bash
# run: |
# echo "store=$(pnpm store path)" >> $GITHUB_OUTPUT
# echo "date=$(/bin/date -u "+%Y-%m-%d")" >> $GITHUB_OUTPUT
- name: Get pnpm cache info
id: pnpm-cache
run: |
echo "store=$(pnpm store path)" >> $GITHUB_OUTPUT
# - uses: actions/cache@v3
# name: Setup pnpm cache
# with:
# path: ${{ steps.pnpm-cache.outputs.store }}
# key: ${{ runner.os }}-pnpm-store-cache-${{ steps.pnpm-cache.outputs.date }}
- name: Restore pnpm cache
uses: actions/cache/restore@v3
with:
path: ${{ steps.pnpm-cache.outputs.store }}
key: ${{ runner.os }}-pnpm-store-cache-
restore-keys: ${{ runner.os }}-pnpm-store-cache-

- run: |
# If we're deleting packages, pnpm won't know what other unrelated packages
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/pnpm-cache.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
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@v4
- uses: actions/setup-node@v3
- uses: pnpm/action-setup@v2

- 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@v3
with:
path: ${{ steps.pnpm-cache.outputs.store }}
key: ${{ runner.os }}-pnpm-store-cache-${{ steps.pnpm-cache.outputs.date }}

0 comments on commit b784555

Please sign in to comment.