Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion bundler.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ const path = require('path')
const core = require('@actions/core')
const exec = require('@actions/exec')
const cache = require('@actions/cache')
const github = require('@actions/github')
const common = require('./common')

export const DEFAULT_CACHE_VERSION = '0'
Expand Down Expand Up @@ -197,7 +198,8 @@ export async function bundleInstall(gemfile, lockFile, platform, engine, rubyVer
await exec.exec('bundle', ['install', '--jobs', '4'])

// @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) && github.context.eventName !== 'merge_group') {
if (cachedKey) { // existing cache but Gemfile.lock differs, clean old gems
await exec.exec('bundle', ['clean'])
}
Expand Down
Loading
Loading