Skip to content

Commit 178c75e

Browse files
committed
Correctly restore cache and save it
1 parent 4f8a2d8 commit 178c75e

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

.github/actions/cache-typst/action.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,13 @@ name: "Restore any Typst package cache"
22
description: "Configures the caching for Typst packages"
33
outputs:
44
cache-hit:
5-
description: "Is there a cache restored ?"
5+
description: "Was a cache found with primary key ?"
66
value: ${{ steps.cache-typst-restore.outputs.cache-hit }}
7-
cache-key:
8-
description: "Key of the cache considered"
7+
cache-primary-key:
8+
description: "Key of the cache to find and save"
9+
value: ${{ steps.cache-typst-restore.outputs.cache-primary-key }}
10+
cache-matched-key:
11+
description: "Key of the cache found and used."
912
value: ${{ steps.cache-typst-restore.outputs.cache-primary-key }}
1013
cache-path:
1114
description: "where is the packages cache for typst ?"
@@ -41,3 +44,5 @@ runs:
4144
with:
4245
path: ${{ env.TYPST_CACHE }}
4346
key: ${{ runner.os }}-typst-1
47+
restore-keys: |
48+
${{ runner.os }}-typst-

.github/workflows/test-smokes.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,8 @@ jobs:
294294
if: always()
295295
uses: actions/cache/save@v4
296296
with:
297-
key: ${{ steps.cache-typst.outputs.cache-key }}
297+
key: ${{ steps.cache-typst.outputs.cache-primary-key }}
298+
path: ${{ steps.cache-typst.outputs.cache-path }}
298299

299300
- uses: actions/upload-artifact@v4
300301
# PLaywright test only runs on Linux for now

0 commit comments

Comments
 (0)