From 39092ad082362c6a540f03c59c3ef4d2a221ab72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=AA=E3=81=A4=E3=81=8D?= Date: Tue, 30 Sep 2025 11:47:28 -0700 Subject: [PATCH] Skip saving cache for merge_group event --- bundler.js | 3 ++- dist/index.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/bundler.js b/bundler.js index 988360850..28f4ca9a3 100644 --- a/bundler.js +++ b/bundler.js @@ -218,7 +218,8 @@ export async function bundleInstall(gemfile, lockFile, platform, engine, rubyVer await exec.exec('bundle', ['install', '--jobs', `${jobs}`]) // @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 await exec.exec('bundle', ['clean']) } diff --git a/dist/index.js b/dist/index.js index 27cb04d14..80aa5749c 100644 --- a/dist/index.js +++ b/dist/index.js @@ -232,7 +232,8 @@ async function bundleInstall(gemfile, lockFile, platform, engine, rubyVersion, b await exec.exec('bundle', ['install', '--jobs', `${jobs}`]) // @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 await exec.exec('bundle', ['clean']) }