From 0ecad18fe538ef70f6b82773daecc6af1a7fe58a Mon Sep 17 00:00:00 2001 From: Benoit Daloze Date: Fri, 25 Jul 2025 22:08:50 +0200 Subject: [PATCH 1/9] 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/9] 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/9] 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/9] 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/9] 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/9] 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/9] 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, { From 595828d48d03a26a98a9181e6a7b3a957ea368b4 Mon Sep 17 00:00:00 2001 From: Yuki Fukuma Date: Wed, 6 Aug 2025 08:56:45 +0900 Subject: [PATCH 8/9] Update ruby version in `README.md` Use current ruby version in examples. --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index c8fd9ffba..301c40042 100644 --- a/README.md +++ b/README.md @@ -79,7 +79,7 @@ jobs: - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 with: - ruby-version: '3.3' # Not needed with a .ruby-version, .tool-versions or mise.toml + ruby-version: '3.4' # Not needed with a .ruby-version, .tool-versions or mise.toml bundler-cache: true # runs 'bundle install' and caches installed gems automatically - run: bundle exec rake ``` @@ -98,7 +98,7 @@ jobs: matrix: os: [ubuntu-latest, macos-latest] # Due to https://github.com/actions/runner/issues/849, we have to use quotes for '3.0' - ruby: ['2.7', '3.0', '3.1', '3.2', '3.3', head, jruby, jruby-head, truffleruby, truffleruby-head] + ruby: ['2.7', '3.0', '3.1', '3.2', '3.3', '3.4', head, jruby, jruby-head, truffleruby, truffleruby-head] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 @@ -127,7 +127,7 @@ jobs: - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 with: - ruby-version: '3.3' + ruby-version: '3.4' bundler-cache: true # runs 'bundle install' and caches installed gems automatically - run: bundle exec rake ``` From 76da3376798599115ed11bf448e7a8390e34378c Mon Sep 17 00:00:00 2001 From: Benoit Daloze Date: Wed, 6 Aug 2025 13:10:04 +0200 Subject: [PATCH 9/9] Update GitHub-hosted runners link --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 301c40042..1eeb590ad 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ which means Ruby ≤ 2.4 is unmaintained and considered insecure. ### Supported Platforms -The action works on these [GitHub-hosted runners](https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources) images. Runner images not listed below are not supported yet. `$OS-latest` just alias to one of these images. +The action works on these [GitHub-hosted runners](https://docs.github.com/en/actions/reference/runners/github-hosted-runners) images. Runner images not listed below are not supported yet. `$OS-latest` just alias to one of these images. | Operating System | Supported | | ---------------- | --------- | 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