We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 9b1fee3 + c4a8371 commit 25a54adCopy full SHA for 25a54ad
.github/workflows/ci.yml
@@ -13,7 +13,7 @@ env:
13
jobs:
14
rubocop:
15
name: Rubocop
16
- runs-on: 'ubuntu-20.04'
+ runs-on: 'ubuntu-latest'
17
steps:
18
- uses: actions/checkout@v4
19
- uses: ruby/setup-ruby@v1
script/update_rubygems_and_install_bundler
@@ -2,6 +2,20 @@
2
3
set -e
4
5
-echo "Installing latest rubygems / bundler"
6
-yes | gem update --system
7
-yes | gem install bundler
+function is_ruby_31_plus {
+ if ruby -e "exit(RUBY_VERSION.to_f >= 3.1)"; then
+ return 0
8
+ else
9
+ return 1
10
+ fi
11
+}
12
+
+if is_ruby_31_plus; then
+ echo "Installing latest rubygems / bundler"
+ yes | gem update --system
+ yes | gem install bundler
+else
+ echo "Installing rubygems 3.2.22 / bundler 2.2.22"
+ yes | gem update --system '3.2.22'
20
+ yes | gem install bundler -v '2.2.22'
21
+fi
0 commit comments