File tree Expand file tree Collapse file tree 2 files changed +28
-5
lines changed Expand file tree Collapse file tree 2 files changed +28
-5
lines changed Original file line number Diff line number Diff line change 1- name : " Cache Typst package"
1+ name : " Restore any Typst package cache "
22description : " Configures the caching for Typst packages"
3+ outputs :
4+ cache-hit :
5+ description : " Was a cache found with primary key ?"
6+ value : ${{ steps.cache-typst-restore.outputs.cache-hit }}
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."
12+ value : ${{ steps.cache-typst-restore.outputs.cache-primary-key }}
13+ cache-path :
14+ description : " where is the packages cache for typst ?"
15+ value : ${{ steps.cache-typst-path.outputs.TYPST_CACHE }}
316
417runs :
518 using : " composite"
619 steps :
720 - name : Typst Cache path
21+ id : cache-typst-path
822 run : |
923 case $RUNNER_OS in
1024 "Linux")
@@ -21,13 +35,14 @@ runs:
2135 exit 1
2236 ;;
2337 esac
38+ echo "TYPST_CACHE=${TYPST_CACHE}" >> $GITHUB_OUTPUT
2439 shell : bash
2540
2641 - name : Cache Typst package folder
27- uses : actions/cache@v4
42+ id : cache-typst-restore
43+ uses : actions/cache/restore@v4
2844 with :
2945 path : ${{ env.TYPST_CACHE }}
30- key : ${{ runner.os }}-typst-1-${{ github.run_id }}
46+ key : ${{ runner.os }}-typst-1
3147 restore-keys : |
32- ${{ runner.os }}-typst-1-
33- save-always : true
48+ ${{ runner.os }}-typst-
Original file line number Diff line number Diff line change @@ -161,6 +161,7 @@ jobs:
161161 quarto install tinytex
162162
163163 - name : Cache Typst packages
164+ id : cache-typst
164165 uses : ./.github/actions/cache-typst
165166
166167 - name : Install Chrome
@@ -289,6 +290,13 @@ jobs:
289290 name : timed test file
290291 path : tests/timing-for-ci.txt
291292
293+ - name : Save Typst cache
294+ if : always()
295+ uses : actions/cache/save@v4
296+ with :
297+ key : ${{ steps.cache-typst.outputs.cache-primary-key }}
298+ path : ${{ steps.cache-typst.outputs.cache-path }}
299+
292300 - uses : actions/upload-artifact@v4
293301 # PLaywright test only runs on Linux for now
294302 if : ${{ !cancelled() && runner.os != 'Windows' }}
You can’t perform that action at this time.
0 commit comments