DEV: Correct CI which is failing on Ruby 3.0 (#179)

DEV: Correct CI which is failing on Ruby 3.0 (#179)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index c8ad633..8a7b297 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -26,10 +26,17 @@ jobs:
           key: ${{ runner.os }}-${{ matrix.ruby }}-gems-v2-${{ hashFiles('**/Gemfile.lock') }}
           restore-keys: |
             ${{ runner.os }}-${{ matrix.ruby }}-gems-v2-
-      - name: Setup gems
+
+      - name: Downgrade rubygems
         run: |
           # for Ruby <= 2.6 , details https://github.com/rubygems/rubygems/issues/3284
-          gem update --system 3.0.8 && gem update --system
+          gem update --system 3.0.8
+        if: ${{ matrix.ruby == '2.6' || matrix.ruby == '2.7' }}
+      - name: Upgrade rubygems
+        run: |
+          gem update --system
+      - name: Setup gems
+        run: |
           gem install bundler
           bundle config path vendor/bundle
           bundle install --jobs 4

GitHub sha: d6c209c3b765d786dee985830376bb41d5a958a7

This commit appears in #179 which was merged by SamSaffron.