Skip to content

Commit 374e62b

Browse files
authored
Update packer.yml
1 parent 915c74c commit 374e62b

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

.github/workflows/packer.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ jobs:
121121
id: cache-restore
122122
uses: actions/cache/restore@v4
123123
with:
124-
key: ${{ runner.os }}-Packer-${{ hashFiles('source/Packer/**') }}
124+
key: ${{ runner.os }}-Packer-${{ hashFiles('src/Packer/**') }}
125125
path: |
126126
Packer.exe
127127
git2-*.dll
@@ -286,12 +286,16 @@ jobs:
286286
name: Upload Resource Packs to Remote Server
287287
needs: [ pack, build-uploader ] # 显然,需要打包完成,并且存在上传程序,才可以上传给分发服务器
288288
runs-on: windows-latest
289-
steps:
289+
steps:
290+
- uses: actions/checkout@v4 # 计算 cache key 需要
291+
with:
292+
fetch-depth: 1
293+
sparse-checkout: src
290294
- name: Restore Uploader
291295
id: cache-restore
292296
uses: actions/cache/restore@v4
293297
with:
294-
key: ${{ runner.os }}-Packer-${{ hashFiles('src/Uploader/**') }}
298+
key: ${{ runner.os }}-Uploader-${{ hashFiles('src/Uploader/**') }}
295299
path: |
296300
Uploader.exe
297301
fail-on-cache-miss: true # 前一步理应构造过的。如果不命中,肯定有问题,不如直接挂掉。

0 commit comments

Comments
 (0)