Skip to content

rake.yml installs the bundle twice: setup-ruby@v1 caches it, then the explicit bundle install runs against a fresh vendor/bundle path #234

Description

@kreinba

.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.

Activity

  1. kreinba commented on Jun 7, 2026

    @kreinba
    ContributorAuthor

    @yegor256 happy to clarify the cache interaction or to send a follow-up pull request once you confirm which of the two fixes you prefer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions