Skip to content

Commit 7ca6766

Browse files
committed
build: cache: change key up
1 parent 637e8b5 commit 7ca6766

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

.github/workflows/build-openwrt.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ jobs:
402402
path: |
403403
${{ github.workspace }}/openwrt/feeds/packages
404404
${{ github.workspace }}/openwrt/feeds/luci
405-
key: ${{ env.CACHE_NAME }}-PureFusionWRT-2023
405+
key: ${{ env.CACHE_NAME }}-${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
406406
### ----------------------------------------------------------------- ###
407407
- name: 'Restore build Directory from cache'
408408
id: build-cache
@@ -412,7 +412,7 @@ jobs:
412412
CACHE_NAME: 'build-cache'
413413
with:
414414
path: ${{ github.workspace }}/openwrt/build_dir
415-
key: ${{ env.CACHE_NAME }}-PureFusionWRT-2023
415+
key: ${{ env.CACHE_NAME }}-${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
416416
### ----------------------------------------------------------------- ###
417417
- name: 'Restore staging Directory from cache'
418418
id: staging-cache
@@ -422,7 +422,7 @@ jobs:
422422
CACHE_NAME: 'staging-cache'
423423
with:
424424
path: ${{ github.workspace }}/openwrt/staging_dir
425-
key: ${{ env.CACHE_NAME }}-PureFusionWRT-2023
425+
key: ${{ env.CACHE_NAME }}-${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
426426
### ----------------------------------------------------------------- ###
427427
- name: 'Restore package Directory from cache'
428428
id: package-cache
@@ -432,7 +432,7 @@ jobs:
432432
CACHE_NAME: 'package-cache'
433433
with:
434434
path: ${{ github.workspace }}/openwrt/package
435-
key: ${{ env.CACHE_NAME }}-PureFusionWRT-2023
435+
key: ${{ env.CACHE_NAME }}-${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
436436
### ----------------------------------------------------------------- ###
437437
- name: 'Restore downloads Directory from cache'
438438
id: dl-cache
@@ -442,7 +442,7 @@ jobs:
442442
CACHE_NAME: 'dl-cache'
443443
with:
444444
path: ${{ github.workspace }}/openwrt/dl
445-
key: ${{ env.CACHE_NAME }}-PureFusionWRT-2023
445+
key: ${{ env.CACHE_NAME }}-${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
446446
### ----------------------------------------------------------------- ###
447447
- name: 'Restore build_dir/toolchain Directory from cache'
448448
id: build_dir_toolchain-cache
@@ -452,7 +452,7 @@ jobs:
452452
CACHE_NAME: 'build_dir_toolchain-cache'
453453
with:
454454
path: ${{ github.workspace }}/openwrt/build_dir/toolchain-*
455-
key: ${{ env.CACHE_NAME }}-PureFusionWRT-2023
455+
key: ${{ env.CACHE_NAME }}-${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
456456
### ----------------------------------------------------------------- ###
457457
- name: 'Restore build_dir/target Directory from cache'
458458
id: build_dir_target-cache
@@ -462,7 +462,7 @@ jobs:
462462
CACHE_NAME: 'build_dir_target-cache'
463463
with:
464464
path: ${{ github.workspace }}/openwrt/build_dir/target-*
465-
key: ${{ env.CACHE_NAME }}-PureFusionWRT-2023
465+
key: ${{ env.CACHE_NAME }}-${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
466466
### ----------------------------------------------------------------- ###
467467
- name: 'Restore build_dir/host Directory from cache'
468468
id: build_dir_host-cache
@@ -472,7 +472,7 @@ jobs:
472472
CACHE_NAME: 'build_dir_host-cache'
473473
with:
474474
path: ${{ github.workspace }}/openwrt/build_dir/host
475-
key: ${{ env.CACHE_NAME }}-PureFusionWRT-2023
475+
key: ${{ env.CACHE_NAME }}-${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
476476
### ----------------------------------------------------------------- ###
477477
- name: 'Restore build_dir/hostpkg Directory from cache'
478478
id: build_dir_hostpkg-cache
@@ -482,7 +482,7 @@ jobs:
482482
CACHE_NAME: 'build_dir_hostpkg-cache'
483483
with:
484484
path: ${{ github.workspace }}/openwrt/build_dir/hostpkg
485-
key: ${{ env.CACHE_NAME }}-PureFusionWRT-2023
485+
key: ${{ env.CACHE_NAME }}-${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
486486
### ----------------------------------------------------------------- ###
487487
- name: 'Restore .ccache from cache'
488488
id: ccache-cache
@@ -492,7 +492,7 @@ jobs:
492492
CACHE_NAME: 'ccache-cache'
493493
with:
494494
path: ${{ github.workspace }}/openwrt/.ccache
495-
key: ${{ env.CACHE_NAME }}-PureFusionWRT-2023
495+
key: ${{ env.CACHE_NAME }}-${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
496496
### ----------------------------------------------------------------- ###
497497
- name: Setup cache for OpenWRT (ccache)
498498
id: ccache

0 commit comments

Comments
 (0)