Skip to content

Commit

Permalink
update cache
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeKarow committed Sep 8, 2023
1 parent 84a1b3f commit d70d3d5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 35 deletions.
21 changes: 5 additions & 16 deletions .github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,30 +18,19 @@ jobs:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
with:
fetch-depth: 0
- name: Install Node.js
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3
with:
node-version: 18
- uses: pnpm/action-setup@d882d12c64e032187b2edb46d3a0d003b7a43598 # v2.4.0
name: Install pnpm
id: pnpm-install
with:
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: 'echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT'
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3
name: Setup pnpm cache
- name: Install Node.js
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
# 👇 Runs pnpm in ./packages/ui
node-version-file: .nvmrc
cache: pnpm
cache-dependency-path: pnpm-lock.yaml
- name: Install dependencies
run: pnpm install
# 👇 Runs Chromatic CLI in ./packages/ui
- name: Publish to Chromatic
uses: chromaui/action@a45a922b9a7522a4cbb59a7bb7b288a768968924 # v1
with:
Expand Down
27 changes: 8 additions & 19 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,30 +27,19 @@ jobs:
git_config_global: true
git_commit_gpgsign: true

- name: Install Node.js
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3
with:
node-version: 18

- uses: pnpm/action-setup@d882d12c64e032187b2edb46d3a0d003b7a43598 # v2.4.0
name: Install pnpm
id: pnpm-install
with:
run_install: false
# standalone: true

- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3
name: Setup pnpm cache
- name: Install Node.js
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
node-version-file: .nvmrc
cache: pnpm
cache-dependency-path: pnpm-lock.yaml

- name: Install dependencies
run: pnpm install
Expand All @@ -72,7 +61,7 @@ jobs:
with:
message: 'chore: lint & format'
commit: --signoff --no-verify
committer_name: InReach Bot
committer_name: InReach [bot]
committer_email: [email protected]
author_name: InReach Bot
author_name: InReach [bot]
author_email: [email protected]

0 comments on commit d70d3d5

Please sign in to comment.