Skip to content

Commit 79935ae

Browse files
committed
fix: specify bundler version in setup-ruby action
Use the 'bundler' parameter in ruby/setup-ruby action to install bundler 2.3 for Ruby 2.7 and default for Ruby 3.4, preventing the automatic installation of incompatible bundler 2.6.6.
1 parent d4bf906 commit 79935ae

File tree

1 file changed

+15
-27
lines changed

1 file changed

+15
-27
lines changed

.github/workflows/ci.yml

Lines changed: 15 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -25,21 +25,17 @@ jobs:
2525
with:
2626
ruby-version: ${{ matrix.ruby }}
2727
bundler-cache: false
28-
29-
- name: Install compatible bundler for Ruby 2.7
30-
if: matrix.ruby == '2.7'
31-
run: |
32-
gem install bundler -v '~> 2.3.0'
33-
bundle config set --local path 'vendor/bundle'
34-
bundle config set --local frozen false
35-
bundle update --bundler
28+
bundler: ${{ matrix.ruby == '2.7' && '2.3' || 'default' }}
3629

3730
- name: Configure bundler
38-
if: matrix.ruby != '2.7'
3931
run: |
4032
bundle config set --local path 'vendor/bundle'
4133
bundle config set --local frozen false
4234
35+
- name: Update bundler in lockfile for Ruby 2.7
36+
if: matrix.ruby == '2.7'
37+
run: bundle update --bundler
38+
4339
- name: Install dependencies
4440
run: bundle install
4541

@@ -63,21 +59,17 @@ jobs:
6359
with:
6460
ruby-version: ${{ matrix.ruby }}
6561
bundler-cache: false
66-
67-
- name: Install compatible bundler for Ruby 2.7
68-
if: matrix.ruby == '2.7'
69-
run: |
70-
gem install bundler -v '~> 2.3.0'
71-
bundle config set --local path 'vendor/bundle'
72-
bundle config set --local frozen false
73-
bundle update --bundler
62+
bundler: ${{ matrix.ruby == '2.7' && '2.3' || 'default' }}
7463

7564
- name: Configure bundler
76-
if: matrix.ruby != '2.7'
7765
run: |
7866
bundle config set --local path 'vendor/bundle'
7967
bundle config set --local frozen false
8068
69+
- name: Update bundler in lockfile for Ruby 2.7
70+
if: matrix.ruby == '2.7'
71+
run: bundle update --bundler
72+
8173
- name: Install base dependencies
8274
run: bundle install
8375

@@ -107,21 +99,17 @@ jobs:
10799
with:
108100
ruby-version: ${{ matrix.ruby }}
109101
bundler-cache: false
110-
111-
- name: Install compatible bundler for Ruby 2.7
112-
if: matrix.ruby == '2.7'
113-
run: |
114-
gem install bundler -v '~> 2.3.0'
115-
bundle config set --local path 'vendor/bundle'
116-
bundle config set --local frozen false
117-
bundle update --bundler
102+
bundler: ${{ matrix.ruby == '2.7' && '2.3' || 'default' }}
118103

119104
- name: Configure bundler
120-
if: matrix.ruby != '2.7'
121105
run: |
122106
bundle config set --local path 'vendor/bundle'
123107
bundle config set --local frozen false
124108
109+
- name: Update bundler in lockfile for Ruby 2.7
110+
if: matrix.ruby == '2.7'
111+
run: bundle update --bundler
112+
125113
- name: Install base dependencies
126114
run: bundle install
127115

0 commit comments

Comments
 (0)