diff --git a/bundler.js b/bundler.js index c79d192e4..7b0324193 100644 --- a/bundler.js +++ b/bundler.js @@ -183,7 +183,8 @@ async function computeBaseKey(platform, engine, version, lockFile, cacheVersion) const cacheVersionSuffix = DEFAULT_CACHE_VERSION === cacheVersion ? '' : `-cachever:${cacheVersion}` let key = `setup-ruby-bundler-cache-v3-${platform}-${engine}-${version}${cacheVersionSuffix}` - if (engine !== 'jruby' && common.isHeadVersion(version)) { + if (engine === 'ruby' && common.isHeadVersion(version)) { + // CRuby dev versions do not change the ABI version when the ABI changes, so append the commit to the ABI version let revision = ''; await exec.exec('ruby', ['-e', 'print RUBY_REVISION'], { silent: true, diff --git a/dist/index.js b/dist/index.js index 417db9bc9..b48bce97f 100644 --- a/dist/index.js +++ b/dist/index.js @@ -197,7 +197,8 @@ async function computeBaseKey(platform, engine, version, lockFile, cacheVersion) const cacheVersionSuffix = DEFAULT_CACHE_VERSION === cacheVersion ? '' : `-cachever:${cacheVersion}` let key = `setup-ruby-bundler-cache-v3-${platform}-${engine}-${version}${cacheVersionSuffix}` - if (engine !== 'jruby' && common.isHeadVersion(version)) { + if (engine === 'ruby' && common.isHeadVersion(version)) { + // CRuby dev versions do not change the ABI version when the ABI changes, so append the commit to the ABI version let revision = ''; await exec.exec('ruby', ['-e', 'print RUBY_REVISION'], { silent: true,