-
-
Notifications
You must be signed in to change notification settings - Fork 269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Only perform bundler actions / don't install Ruby #489
Comments
Or maybe it will be possible to set |
I'm not clear how actions work inside Docker images, but I suppose they do? PR welcome. |
@eregon yep, seems you are right, for case in issue description, it is much clearer just run bundle install to separate bundler path and then use https://github.com/actions/cache directly. Smth like: jobs:
specs:
runs-on: ubuntu-latest
container: ruby:2.4.10-stretch
services:
redis:
image: redis:6.2-alpine
ports:
- "6379:6379"
postgres:
image: postgres:11-bullseye
ports:
- "5432:5432"
env:
RAILS_ENV: "test"
BUNDLE_PATH: "/opt/ruby-gemset"
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Cache gemset
id: gemset-cache
uses: actions/cache@v3
with:
path: /opt/ruby-gemset
key: ${{ runner.os }}-${{ hashFiles('Gemfile.lock') }}
- name: Install ruby gems
run: bundle install --jobs 8
- name: Create database config file
run: cp config/database.yml.example config/database.yml
- name: Run tests
run: |
bin/rake db:setup
bin/rspec |
The linked recommendation explicitly says not to do that:
|
We run actions with a custom Docker image that already contains Ruby and Bundler.
The recommendation is to use this action to cache gems with Bundler, but I don't want it to also install Ruby.
Can we set something like
ruby_version: none
to skip that part?The text was updated successfully, but these errors were encountered: