.github/workflows/rake.yml:13-19 calls ruby/setup-ruby@v1 with bundler-cache: true, then immediately re-points Bundler at a different directory and runs bundle install a second time:
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.4.9
bundler-cache: true
- run: bundle config set --global path "$(pwd)/vendor/bundle"
- run: bundle install --no-color
bundler-cache: true already runs bundle install and saves a cache keyed on Gemfile.lock; the gems land at the default install path. The next step writes path "$(pwd)/vendor/bundle" into ~/.bundle/config, so Bundler stops reading the just-restored cache. The third step then installs every gem from scratch under vendor/bundle.
The cache restored by setup-ruby is dead weight: it lives at a location Bundler no longer consults, never shortens the build, and still costs network and storage on save and restore.
The fix is one of two single-line edits. Drop bundler-cache: true and keep the explicit vendor/bundle install, or drop the two follow-up lines and let setup-ruby install at its default cached path.
.github/workflows/rake.yml:13-19callsruby/setup-ruby@v1withbundler-cache: true, then immediately re-points Bundler at a different directory and runsbundle installa second time:bundler-cache: truealready runsbundle installand saves a cache keyed onGemfile.lock; the gems land at the default install path. The next step writespath "$(pwd)/vendor/bundle"into~/.bundle/config, so Bundler stops reading the just-restored cache. The third step then installs every gem from scratch undervendor/bundle.The cache restored by
setup-rubyis dead weight: it lives at a location Bundler no longer consults, never shortens the build, and still costs network and storage on save and restore.The fix is one of two single-line edits. Drop
bundler-cache: trueand keep the explicitvendor/bundleinstall, or drop the two follow-up lines and letsetup-rubyinstall at its default cached path.