mirror of
https://github.com/ruby/setup-ruby.git
synced 2026-09-13 14:34:21 +02:00
Skip saving cache for merge_group event
This commit is contained in:
+2
-1
@@ -218,7 +218,8 @@ export async function bundleInstall(gemfile, lockFile, platform, engine, rubyVer
|
|||||||
await exec.exec('bundle', ['install', '--jobs', `${jobs}`])
|
await exec.exec('bundle', ['install', '--jobs', `${jobs}`])
|
||||||
|
|
||||||
// @actions/cache only allows to save for non-existing keys
|
// @actions/cache only allows to save for non-existing keys
|
||||||
if (!common.isExactCacheKeyMatch(key, cachedKey)) {
|
// Also, skip saving cache for merge_group event
|
||||||
|
if (!common.isExactCacheKeyMatch(key, cachedKey) && process.env['GITHUB_EVENT_NAME'] !== 'merge_group') {
|
||||||
if (cachedKey) { // existing cache but Gemfile.lock differs, clean old gems
|
if (cachedKey) { // existing cache but Gemfile.lock differs, clean old gems
|
||||||
await exec.exec('bundle', ['clean'])
|
await exec.exec('bundle', ['clean'])
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-1
@@ -232,7 +232,8 @@ async function bundleInstall(gemfile, lockFile, platform, engine, rubyVersion, b
|
|||||||
await exec.exec('bundle', ['install', '--jobs', `${jobs}`])
|
await exec.exec('bundle', ['install', '--jobs', `${jobs}`])
|
||||||
|
|
||||||
// @actions/cache only allows to save for non-existing keys
|
// @actions/cache only allows to save for non-existing keys
|
||||||
if (!common.isExactCacheKeyMatch(key, cachedKey)) {
|
// Also, skip saving cache for merge_group event
|
||||||
|
if (!common.isExactCacheKeyMatch(key, cachedKey) && process.env['GITHUB_EVENT_NAME'] !== 'merge_group') {
|
||||||
if (cachedKey) { // existing cache but Gemfile.lock differs, clean old gems
|
if (cachedKey) { // existing cache but Gemfile.lock differs, clean old gems
|
||||||
await exec.exec('bundle', ['clean'])
|
await exec.exec('bundle', ['clean'])
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user