From 94e27e75de9d82314e8aea9cdd4bb27e07ab77ae Mon Sep 17 00:00:00 2001 From: r7kamura Date: Wed, 4 Oct 2023 03:28:20 +0900 Subject: [PATCH] Consider BUNDLE_ONLY in cache key --- bundler.js | 3 ++- dist/index.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/bundler.js b/bundler.js index 81c64bac6..d0f40eca3 100644 --- a/bundler.js +++ b/bundler.js @@ -236,7 +236,8 @@ async function computeBaseKey(platform, engine, version, lockFile, cacheVersion) const cwd = process.cwd() const bundleWith = process.env['BUNDLE_WITH'] || '' const bundleWithout = process.env['BUNDLE_WITHOUT'] || '' - let key = `setup-ruby-bundler-cache-v6-${common.getOSNameVersionArch()}-${engine}-${version}-wd-${cwd}-with-${bundleWith}-without-${bundleWithout}` + const bundleOnly = process.env['BUNDLE_ONLY'] || '' + let key = `setup-ruby-bundler-cache-v6-${common.getOSNameVersionArch()}-${engine}-${version}-wd-${cwd}-with-${bundleWith}-without-${bundleWithout}-only-${bundleOnly}` if (cacheVersion !== DEFAULT_CACHE_VERSION) { key += `-v-${cacheVersion}` diff --git a/dist/index.js b/dist/index.js index 9e81ee702..728353204 100644 --- a/dist/index.js +++ b/dist/index.js @@ -250,7 +250,8 @@ async function computeBaseKey(platform, engine, version, lockFile, cacheVersion) const cwd = process.cwd() const bundleWith = process.env['BUNDLE_WITH'] || '' const bundleWithout = process.env['BUNDLE_WITHOUT'] || '' - let key = `setup-ruby-bundler-cache-v6-${common.getOSNameVersionArch()}-${engine}-${version}-wd-${cwd}-with-${bundleWith}-without-${bundleWithout}` + const bundleOnly = process.env['BUNDLE_ONLY'] || '' + let key = `setup-ruby-bundler-cache-v6-${common.getOSNameVersionArch()}-${engine}-${version}-wd-${cwd}-with-${bundleWith}-without-${bundleWithout}-only-${bundleOnly}` if (cacheVersion !== DEFAULT_CACHE_VERSION) { key += `-v-${cacheVersion}`