Skip to content

Commit 9c1d1dd

Browse files
committed
fix: prevent format workflow from uploading build cache
1 parent a41922e commit 9c1d1dd

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

.github/actions/setup-node-pnpm/action.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
name: setup-node-pnpm
22
description: Setup Node and PNPM
33

4+
inputs:
5+
build-cache:
6+
description: "Whether to cache build output (default: true)"
7+
required: false
8+
default: "true"
9+
410
runs:
511
using: composite
612
steps:
@@ -15,9 +21,10 @@ runs:
1521

1622
- name: cache sharp output
1723
uses: actions/cache@v4
24+
if: ${{ inputs.build-cache == 'true' }}
1825
with:
1926
path: node_modules/.astro/assets
2027
# presume that the image optimization configuration changed if the lockfile or config file changed
21-
key: sharp-${{ hashFiles('pnpm-lock.yaml', 'astro.config.ts', 'src/**/*.png', 'src/**/*.webp', 'src/**/*.gif') }}
28+
key: sharp-${{ hashFiles('/pnpm-lock.yaml', '/astro.config.ts', '/src/**/*.png', '/src/**/*.webp', '/src/**/*.gif') }}
2229
restore-keys: |
2330
sharp-

.github/workflows/format.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ jobs:
1515
uses: actions/checkout@v4
1616
- name: "setup node and pnpm"
1717
uses: ./.github/actions/setup-node-pnpm
18+
with:
19+
build-cache: false
1820
- name: Install dependencies
1921
run: pnpm install
2022
- name: Check format

0 commit comments

Comments
 (0)