Skip to content

Commit 67f2c40

Browse files
committed
fix: invalidate assets cache if configuration or images changed
1 parent 2681747 commit 67f2c40

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,7 @@ runs:
1717
uses: actions/cache@v4
1818
with:
1919
path: node_modules/.astro/assets
20-
key: sharp
20+
# 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') }}
22+
restore-keys: |
23+
sharp-

0 commit comments

Comments
 (0)