File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -136,6 +136,23 @@ This caching speeds up installing gems significantly and avoids too many request
136136It needs a `Gemfile` (or `$BUNDLE_GEMFILE` or `gems.rb`) under the [`working-directory`](#working-directory).
137137If there is a `Gemfile.lock` (or `$BUNDLE_GEMFILE.lock` or `gems.locked`), `bundle config --local deployment true` is used.
138138
139+ To use a `Gemfile` which is not at the root, set `BUNDLE_GEMFILE` in the `env` at the job level, so it is set for all steps :
140+ ` ` ` yaml
141+
142+ jobs:
143+ test:
144+ runs-on: ubuntu-latest
145+ env:
146+ BUNDLE_GEMFILE: subdir/Gemfile
147+ steps:
148+ - uses: actions/checkout@v2
149+ - uses: ruby/setup-ruby@v1
150+ with:
151+ ruby-version: 2.6
152+ bundler-cache: true
153+ - run: bundle exec rake
154+ ` ` `
155+
139156To perform caching, this action will use `bundle config --local path vendor/bundle`.
140157Therefore, the Bundler `path` should not be changed in your workflow for the cache to work (no `bundle config path`).
141158
You can’t perform that action at this time.
0 commit comments