From 0ecad18fe538ef70f6b82773daecc6af1a7fe58a Mon Sep 17 00:00:00 2001 From: Benoit Daloze Date: Fri, 25 Jul 2025 22:08:50 +0200 Subject: [PATCH 1/7] Revert "Add printing of the lockfile after installation" This reverts commit e8621f0b86851d7377d85882bb751b24dfadd958. --- dist/index.js | 3 --- index.js | 3 --- 2 files changed, 6 deletions(-) diff --git a/dist/index.js b/dist/index.js index 8f55653ad..d82a17d0d 100644 --- a/dist/index.js +++ b/dist/index.js @@ -85350,9 +85350,6 @@ async function setupRuby(options = {}) { if (inputs['bundler-cache'] === 'true') { await common.time('bundle install', async () => bundler.bundleInstall(gemfile, lockFile, platform, engine, version, bundlerVersion, inputs['cache-version'])) - - await core.group(`Print lockfile`, async () => - await exec.exec('cat', [lockFile])) } core.setOutput('ruby-prefix', rubyPrefix) diff --git a/index.js b/index.js index 31c2ccc80..62e46feb9 100644 --- a/index.js +++ b/index.js @@ -99,9 +99,6 @@ export async function setupRuby(options = {}) { if (inputs['bundler-cache'] === 'true') { await common.time('bundle install', async () => bundler.bundleInstall(gemfile, lockFile, platform, engine, version, bundlerVersion, inputs['cache-version'])) - - await core.group(`Print lockfile`, async () => - await exec.exec('cat', [lockFile])) } core.setOutput('ruby-prefix', rubyPrefix) From ba9e71c195cadabb5051b7f88255085a846ee77e Mon Sep 17 00:00:00 2001 From: Jason Frey Date: Thu, 24 Jul 2025 16:32:05 -0400 Subject: [PATCH 2/7] Add printing of the lockfile after installation Closes #783 --- .github/workflows/test.yml | 12 ++++++++++++ dist/index.js | 5 +++++ index.js | 5 +++++ 3 files changed, 22 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b07c79402..d9371a319 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -240,6 +240,18 @@ jobs: ruby-version: '2.6' - run: ruby -v + testNoGemfileWithBundlerCache: + name: "Test with no Gemfile but with bundler-cache" + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - run: rm Gemfile + - uses: ./ + with: + ruby-version: '2.6' + bundler-cache: true + - run: ruby -v + testLatestRubygemsVersion: name: "Test rubygems: latest on ${{ matrix.ruby }}" runs-on: ubuntu-latest diff --git a/dist/index.js b/dist/index.js index d82a17d0d..3c983d4ae 100644 --- a/dist/index.js +++ b/dist/index.js @@ -85350,6 +85350,11 @@ async function setupRuby(options = {}) { if (inputs['bundler-cache'] === 'true') { await common.time('bundle install', async () => bundler.bundleInstall(gemfile, lockFile, platform, engine, version, bundlerVersion, inputs['cache-version'])) + + if (fs.existsSync(lockFile)) { + await core.group(`Print lockfile`, async () => + await exec.exec('cat', [lockFile])) + } } core.setOutput('ruby-prefix', rubyPrefix) diff --git a/index.js b/index.js index 62e46feb9..d783d68fd 100644 --- a/index.js +++ b/index.js @@ -99,6 +99,11 @@ export async function setupRuby(options = {}) { if (inputs['bundler-cache'] === 'true') { await common.time('bundle install', async () => bundler.bundleInstall(gemfile, lockFile, platform, engine, version, bundlerVersion, inputs['cache-version'])) + + if (fs.existsSync(lockFile)) { + await core.group(`Print lockfile`, async () => + await exec.exec('cat', [lockFile])) + } } core.setOutput('ruby-prefix', rubyPrefix) From bb6434c747fa7022e12fa1cae2a0951fcffcff26 Mon Sep 17 00:00:00 2001 From: Benoit Daloze Date: Sat, 26 Jul 2025 10:51:20 +0200 Subject: [PATCH 3/7] Add non-null check --- dist/index.js | 2 +- index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index 3c983d4ae..4df23eced 100644 --- a/dist/index.js +++ b/dist/index.js @@ -85351,7 +85351,7 @@ async function setupRuby(options = {}) { await common.time('bundle install', async () => bundler.bundleInstall(gemfile, lockFile, platform, engine, version, bundlerVersion, inputs['cache-version'])) - if (fs.existsSync(lockFile)) { + if (lockFile !== null && fs.existsSync(lockFile)) { await core.group(`Print lockfile`, async () => await exec.exec('cat', [lockFile])) } diff --git a/index.js b/index.js index d783d68fd..2d29628d7 100644 --- a/index.js +++ b/index.js @@ -100,7 +100,7 @@ export async function setupRuby(options = {}) { await common.time('bundle install', async () => bundler.bundleInstall(gemfile, lockFile, platform, engine, version, bundlerVersion, inputs['cache-version'])) - if (fs.existsSync(lockFile)) { + if (lockFile !== null && fs.existsSync(lockFile)) { await core.group(`Print lockfile`, async () => await exec.exec('cat', [lockFile])) } From 45dc484f8a9c0677adb8eb8f22dcb5b1ebef8635 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 22 Jul 2025 11:12:30 +0000 Subject: [PATCH 4/7] Bump form-data from 2.5.3 to 2.5.5 Bumps [form-data](https://github.com/form-data/form-data) from 2.5.3 to 2.5.5. - [Release notes](https://github.com/form-data/form-data/releases) - [Changelog](https://github.com/form-data/form-data/blob/v2.5.5/CHANGELOG.md) - [Commits](https://github.com/form-data/form-data/compare/v2.5.3...v2.5.5) --- updated-dependencies: - dependency-name: form-data dependency-version: 2.5.5 dependency-type: indirect ... Signed-off-by: dependabot[bot] --- yarn.lock | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 19e5e64af..0b7bfecb1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -376,13 +376,14 @@ fast-xml-parser@^5.0.7: strnum "^2.1.0" form-data@^2.5.0: - version "2.5.3" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.5.3.tgz#f9bcf87418ce748513c0c3494bb48ec270c97acc" - integrity sha512-XHIrMD0NpDrNM/Ckf7XJiBbLl57KEhT3+i3yY+eWm+cqYZJQTZrKo8Y8AWKnuV5GT4scfuUGt9LzNoIx3dU1nQ== + version "2.5.5" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.5.5.tgz#a5f6364ad7e4e67e95b4a07e2d8c6f711c74f624" + integrity sha512-jqdObeR2rxZZbPSGL+3VckHMYtu+f9//KXBsVny6JSX/pa38Fy+bGjuG8eW/H6USNQWhLi8Num++cU2yOCNz4A== dependencies: asynckit "^0.4.0" combined-stream "^1.0.8" es-set-tostringtag "^2.1.0" + hasown "^2.0.2" mime-types "^2.1.35" safe-buffer "^5.2.1" From 3ec1ec052980bdcf0b5ae89a97640818055e7650 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 15 Jul 2025 20:30:18 +0000 Subject: [PATCH 5/7] Bump brace-expansion from 1.1.11 to 1.1.12 Bumps [brace-expansion](https://github.com/juliangruber/brace-expansion) from 1.1.11 to 1.1.12. - [Release notes](https://github.com/juliangruber/brace-expansion/releases) - [Commits](https://github.com/juliangruber/brace-expansion/compare/1.1.11...v1.1.12) --- updated-dependencies: - dependency-name: brace-expansion dependency-version: 1.1.12 dependency-type: indirect ... Signed-off-by: dependabot[bot] --- dist/index.js | 2 +- yarn.lock | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dist/index.js b/dist/index.js index 4df23eced..393c7dd88 100644 --- a/dist/index.js +++ b/dist/index.js @@ -42919,7 +42919,7 @@ function expand(str, isTop) { var isOptions = m.body.indexOf(',') >= 0; if (!isSequence && !isOptions) { // {a},b} - if (m.post.match(/,.*\}/)) { + if (m.post.match(/,(?!,).*\}/)) { str = m.pre + '{' + m.body + escClose + m.post; return expand(str); } diff --git a/yarn.lock b/yarn.lock index 0b7bfecb1..9b8cfef48 100644 --- a/yarn.lock +++ b/yarn.lock @@ -283,9 +283,9 @@ balanced-match@^1.0.0: integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== brace-expansion@^1.1.7: - version "1.1.11" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" - integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + version "1.1.12" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.12.tgz#ab9b454466e5a8cc3a187beaad580412a9c5b843" + integrity sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg== dependencies: balanced-match "^1.0.0" concat-map "0.0.1" From 78876b7c8894d08b42550d55e74f0992dca902d0 Mon Sep 17 00:00:00 2001 From: Eliot Partridge Date: Sun, 20 Oct 2024 20:14:40 -0400 Subject: [PATCH 6/7] Use case-insensitive key comparsion for cache keys --- bundler.js | 2 +- common.js | 12 ++++++++++++ dist/index.js | 15 ++++++++++++++- 3 files changed, 27 insertions(+), 2 deletions(-) diff --git a/bundler.js b/bundler.js index 711871bae..533bfaca7 100644 --- a/bundler.js +++ b/bundler.js @@ -206,7 +206,7 @@ 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 (cachedKey !== key) { + if (!common.isExactKeyMatch(key, cachedKey)) { if (cachedKey) { // existing cache but Gemfile.lock differs, clean old gems await exec.exec('bundle', ['clean']) } diff --git a/common.js b/common.js index 02e57b237..0b122dcc7 100644 --- a/common.js +++ b/common.js @@ -412,3 +412,15 @@ export async function setupJavaHome(rubyPrefix) { } }) } + +// Determines if two keys are an exact match for the purposes of cache matching +// Specifically, this is a case-insensitive match that ignores accents +// From actions/cache@v3 src/utils/actionUtils.ts (MIT) +export function isExactKeyMatch(key, cacheKey) { + return !!( + cacheKey && + cacheKey.localeCompare(key, undefined, { + sensitivity: 'accent' + }) === 0 + ); +} diff --git a/dist/index.js b/dist/index.js index 393c7dd88..813a6df71 100644 --- a/dist/index.js +++ b/dist/index.js @@ -220,7 +220,7 @@ async function bundleInstall(gemfile, lockFile, platform, engine, rubyVersion, b await exec.exec('bundle', ['install', '--jobs', '4']) // @actions/cache only allows to save for non-existing keys - if (cachedKey !== key) { + if (!common.isExactKeyMatch(key, cachedKey)) { if (cachedKey) { // existing cache but Gemfile.lock differs, clean old gems await exec.exec('bundle', ['clean']) } @@ -299,6 +299,7 @@ __nccwpck_require__.r(__webpack_exports__); /* harmony export */ isBundler1Default: () => (/* binding */ isBundler1Default), /* harmony export */ isBundler2Default: () => (/* binding */ isBundler2Default), /* harmony export */ isBundler2dot2Default: () => (/* binding */ isBundler2dot2Default), +/* harmony export */ isExactKeyMatch: () => (/* binding */ isExactKeyMatch), /* harmony export */ isHeadVersion: () => (/* binding */ isHeadVersion), /* harmony export */ isSelfHostedRunner: () => (/* binding */ isSelfHostedRunner), /* harmony export */ isStableVersion: () => (/* binding */ isStableVersion), @@ -730,6 +731,18 @@ async function setupJavaHome(rubyPrefix) { }) } +// Determines if two keys are an exact match for the purposes of cache matching +// Specifically, this is a case-insensitive match that ignores accents +// From actions/cache@v3 src/utils/actionUtils.ts (MIT) +function isExactKeyMatch(key, cacheKey) { + return !!( + cacheKey && + cacheKey.localeCompare(key, undefined, { + sensitivity: 'accent' + }) === 0 + ); +} + /***/ }), From 2a7b30092b0caf9c046252510f9273b4875f3db9 Mon Sep 17 00:00:00 2001 From: Eliot Partridge Date: Mon, 21 Oct 2024 11:52:42 -0400 Subject: [PATCH 7/7] Rename to `isExactCacheKeyMatch` --- bundler.js | 2 +- common.js | 2 +- dist/index.js | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bundler.js b/bundler.js index 533bfaca7..816c56bf8 100644 --- a/bundler.js +++ b/bundler.js @@ -206,7 +206,7 @@ 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.isExactKeyMatch(key, cachedKey)) { + if (!common.isExactCacheKeyMatch(key, cachedKey)) { if (cachedKey) { // existing cache but Gemfile.lock differs, clean old gems await exec.exec('bundle', ['clean']) } diff --git a/common.js b/common.js index 0b122dcc7..72e2a9ceb 100644 --- a/common.js +++ b/common.js @@ -416,7 +416,7 @@ export async function setupJavaHome(rubyPrefix) { // Determines if two keys are an exact match for the purposes of cache matching // Specifically, this is a case-insensitive match that ignores accents // From actions/cache@v3 src/utils/actionUtils.ts (MIT) -export function isExactKeyMatch(key, cacheKey) { +export function isExactCacheKeyMatch(key, cacheKey) { return !!( cacheKey && cacheKey.localeCompare(key, undefined, { diff --git a/dist/index.js b/dist/index.js index 813a6df71..b01209501 100644 --- a/dist/index.js +++ b/dist/index.js @@ -220,7 +220,7 @@ async function bundleInstall(gemfile, lockFile, platform, engine, rubyVersion, b await exec.exec('bundle', ['install', '--jobs', '4']) // @actions/cache only allows to save for non-existing keys - if (!common.isExactKeyMatch(key, cachedKey)) { + if (!common.isExactCacheKeyMatch(key, cachedKey)) { if (cachedKey) { // existing cache but Gemfile.lock differs, clean old gems await exec.exec('bundle', ['clean']) } @@ -299,7 +299,7 @@ __nccwpck_require__.r(__webpack_exports__); /* harmony export */ isBundler1Default: () => (/* binding */ isBundler1Default), /* harmony export */ isBundler2Default: () => (/* binding */ isBundler2Default), /* harmony export */ isBundler2dot2Default: () => (/* binding */ isBundler2dot2Default), -/* harmony export */ isExactKeyMatch: () => (/* binding */ isExactKeyMatch), +/* harmony export */ isExactCacheKeyMatch: () => (/* binding */ isExactCacheKeyMatch), /* harmony export */ isHeadVersion: () => (/* binding */ isHeadVersion), /* harmony export */ isSelfHostedRunner: () => (/* binding */ isSelfHostedRunner), /* harmony export */ isStableVersion: () => (/* binding */ isStableVersion), @@ -734,7 +734,7 @@ async function setupJavaHome(rubyPrefix) { // Determines if two keys are an exact match for the purposes of cache matching // Specifically, this is a case-insensitive match that ignores accents // From actions/cache@v3 src/utils/actionUtils.ts (MIT) -function isExactKeyMatch(key, cacheKey) { +function isExactCacheKeyMatch(key, cacheKey) { return !!( cacheKey && cacheKey.localeCompare(key, undefined, { pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy