cache-version input allowing a forced change of the cache key

This commit is contained in:
Jakub Pavlik
2021-05-15 16:32:01 +02:00
committed by Benoit Daloze
parent 2eb6adbfb1
commit fa2182b2a4
4 changed files with 25 additions and 10 deletions
+2 -1
View File
@@ -12,6 +12,7 @@ const inputDefaults = {
'bundler': 'default',
'bundler-cache': 'true',
'working-directory': '.',
'cache-version': bundler.DEFAULT_CACHE_VERSION,
}
// entry point when this action is run on its own
@@ -67,7 +68,7 @@ export async function setupRuby(options = {}) {
if (inputs['bundler-cache'] === 'true') {
await common.measure('bundle install', async () =>
bundler.bundleInstall(gemfile, lockFile, platform, engine, version, bundlerVersion))
bundler.bundleInstall(gemfile, lockFile, platform, engine, version, bundlerVersion, inputs['cache-version']))
}
}