From 01c2015f7266872e658f2e98a73e5511e64fe20f Mon Sep 17 00:00:00 2001 From: fisker Cheung Date: Thu, 7 May 2020 03:51:25 +0800 Subject: [PATCH] Update CI cache key (#8236) * Update CI cache key * Update build script, expect missing cache --- .github/workflows/prod-test.yml | 8 ++++---- scripts/build/build.js | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/prod-test.yml b/.github/workflows/prod-test.yml index 3f3ec0174..230bf975b 100644 --- a/.github/workflows/prod-test.yml +++ b/.github/workflows/prod-test.yml @@ -33,11 +33,11 @@ jobs: uses: actions/cache@v1 with: path: .cache - key: v1-build-cache-${{ hashFiles('yarn.lock') }}-${{ github.ref }}- + key: v1-build-cache-${{ hashFiles('yarn.lock') }}-${{ hashFiles('scripts/build/**/*') }}-${{ github.ref }}- restore-keys: | - v1-build-cache-${{ hashFiles('yarn.lock') }}-${{ github.ref }}- - v1-build-cache-${{ hashFiles('yarn.lock') }}-refs/heads/${{ github.base_ref }}- - v1-build-cache-${{ hashFiles('yarn.lock') }}-refs/heads/master- + v1-build-cache-${{ hashFiles('yarn.lock') }}-${{ hashFiles('scripts/build/**/*') }}-${{ github.ref }}- + v1-build-cache-${{ hashFiles('yarn.lock') }}-${{ hashFiles('scripts/build/**/*') }}-refs/heads/${{ github.base_ref }}- + v1-build-cache-${{ hashFiles('yarn.lock') }}-${{ hashFiles('scripts/build/**/*') }}-refs/heads/master- - name: Build Package run: yarn build diff --git a/scripts/build/build.js b/scripts/build/build.js index 8797b0816..dedad3536 100644 --- a/scripts/build/build.js +++ b/scripts/build/build.js @@ -21,7 +21,7 @@ process.on("unhandledRejection", (err) => { process.exit(1); }); -const CACHE_VERSION = "v22"; // This need update when updating build scripts +const CACHE_VERSION = "v23"; // This need update when updating build scripts const CACHED = chalk.bgYellow.black(" CACHED "); const OK = chalk.bgGreen.black(" DONE "); const FAIL = chalk.bgRed.black(" FAIL ");