From 512511509904aae8445297fd654089cd1124df71 Mon Sep 17 00:00:00 2001 From: ruki Date: Tue, 29 Nov 2022 00:18:49 +0800 Subject: [PATCH] add sha to cacheky #18 --- src/unix-install.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/unix-install.ts b/src/unix-install.ts index 8bd2096..e5f7349 100644 --- a/src/unix-install.ts +++ b/src/unix-install.ts @@ -21,7 +21,8 @@ export async function unixInstall(version: Version): Promise { if (version.type !== 'local') { const ver = version.version; - const cacheKey = `xmake-cache-${ver}-${os.arch()}-${os.platform()}-${process.env.RUNNER_OS ?? 'unknown'}`; + const sha = version.sha; + 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);