From f8107700be02fa1c152586b196fe06fe55e36b62 Mon Sep 17 00:00:00 2001 From: ruki Date: Tue, 29 Nov 2022 00:19:54 +0800 Subject: [PATCH] fix ci --- README.md | 4 ++-- dist/index.js | 3 ++- src/unix-install.ts | 4 +++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 33ed190..dfcf30d 100644 --- a/README.md +++ b/README.md @@ -48,8 +48,8 @@ Use action cache: ```yml uses: xmake-io/github-action-setup-xmake@v1 with: - xmake-version: "2.7.2" - actions-cache-folder: ".xmake-cache" + xmake-version: '2.7.2' + actions-cache-folder: '.xmake-cache' ``` ## Contributing diff --git a/dist/index.js b/dist/index.js index ff7f084..a5844e6 100644 --- a/dist/index.js +++ b/dist/index.js @@ -70850,7 +70850,8 @@ async function unixInstall(version) { const actionsCacheFolder = core.getInput('actions-cache-folder'); if (version.type !== 'local') { const ver = version.version; - const cacheKey = `xmake-cache-${ver}-${os.arch()}-${os.platform()}-${(_a = process.env.RUNNER_OS) !== null && _a !== void 0 ? _a : 'unknown'}`; + const sha = version.sha; + const cacheKey = `xmake-cache-${ver}-${sha}-${os.arch()}-${os.platform()}-${(_a = process.env.RUNNER_OS) !== null && _a !== void 0 ? _a : 'unknown'}`; if (actionsCacheFolder && process.env.GITHUB_WORKSPACE) { const fullCachePath = path.join(process.env.GITHUB_WORKSPACE, actionsCacheFolder); try { diff --git a/src/unix-install.ts b/src/unix-install.ts index e5f7349..0379a6d 100644 --- a/src/unix-install.ts +++ b/src/unix-install.ts @@ -22,7 +22,9 @@ export async function unixInstall(version: Version): Promise { if (version.type !== 'local') { const ver = version.version; const sha = version.sha; - const cacheKey = `xmake-cache-${ver}-${sha}-${os.arch()}-${os.platform()}-${process.env.RUNNER_OS ?? 'unknown'}`; + const cacheKey = `xmake-cache-${ver}-${sha}-${os.arch()}-${os.platform()}-${ + process.env.RUNNER_OS ?? 'unknown' + }`; if (actionsCacheFolder && process.env.GITHUB_WORKSPACE) { const fullCachePath = path.join(process.env.GITHUB_WORKSPACE, actionsCacheFolder);