Skip to content

Commit 611b4b9

Browse files
committed
ci: disable caching in release workflows
1 parent 44f13f9 commit 611b4b9

3 files changed

Lines changed: 12 additions & 2 deletions

File tree

.github/actions/setup/action.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
name: Setup
22
description: Setup Node.js and install dependencies
33

4+
inputs:
5+
cache:
6+
description: Restore and save the dependency cache
7+
default: 'true'
8+
49
runs:
510
using: composite
611
steps:
@@ -16,6 +21,7 @@ runs:
1621

1722
- name: Restore dependencies
1823
id: pnpm-cache
24+
if: inputs.cache == 'true'
1925
uses: actions/cache/restore@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
2026
with:
2127
path: |
@@ -26,12 +32,12 @@ runs:
2632
${{ runner.os }}-pnpm-${{ hashFiles('pnpm-lock.yaml') }}
2733
2834
- name: Install dependencies
29-
if: steps.pnpm-cache.outputs.cache-hit != 'true'
35+
if: inputs.cache != 'true' || steps.pnpm-cache.outputs.cache-hit != 'true'
3036
run: pnpm install --frozen-lockfile
3137
shell: bash
3238

3339
- name: Cache dependencies
34-
if: steps.pnpm-cache.outputs.cache-hit != 'true'
40+
if: inputs.cache == 'true' && steps.pnpm-cache.outputs.cache-hit != 'true'
3541
uses: actions/cache/save@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
3642
with:
3743
path: |

.github/workflows/docs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ jobs:
1919

2020
- name: Setup
2121
uses: ./.github/actions/setup
22+
with:
23+
cache: 'false'
2224

2325
- name: Build docs
2426
run: pnpm run build:docs

.github/workflows/release.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ jobs:
2222

2323
- name: Setup
2424
uses: ./.github/actions/setup
25+
with:
26+
cache: 'false'
2527

2628
- name: Create release PR or publish to npm
2729
id: changesets

0 commit comments

Comments
 (0)