Skip to content

Commit

Permalink
Migrate from actions/setup-ruby to ruby/setup-ruby
Browse files Browse the repository at this point in the history
The `actions/setup-ruby` action [was deprecated in favor of `ruby/setup-ruby`](actions/setup-ruby@e932e7a#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5R9).

So this switches to that.

Reading the docs for `ruby/setup-ruby`, all the examples include the
following params:
```
with:
        ruby-version: '3.0' # Not needed with a .ruby-version file
        bundler-cache: true # runs 'bundle install' and caches installed gems automatically
```

However, the `ruby-version` looked like it needed to be specified for
`actions/setup-ruby` as well, and it wasn't, so maybe there's a default
that suffices?

And I suspect the `bundler-cache` arg is only relevant for repeated calls to ruby/bundler
within a single CI run... whereas we only call this action once for the following ruby call:
```
gem install rake && rake gems:release
```

So I doubt that caching adds value.
Happy to be proved wrong if someone more familiar with Ruby knows more.
  • Loading branch information
jeffwidman committed Aug 4, 2022
1 parent 218c393 commit befa7ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/gems.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v3
- uses: actions/setup-ruby@v1
- uses: ruby/setup-ruby@v1
- run: |
[ -d ~/.gem ] || mkdir ~/.gem
echo "---" > ~/.gem/credentials
Expand Down

0 comments on commit befa7ff

Please sign in to comment.