Skip to content

Commit c728139

Browse files
committed
cI: Build build_multi matrix
- refactor: Loop versions in bash script
1 parent 1fe00a4 commit c728139

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

.github/workflows/ci.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,19 +56,26 @@ jobs:
5656
doc-build-others:
5757
runs-on: ubuntu-latest
5858
name: Rails Doc Build (older versions)
59+
strategy:
60+
matrix:
61+
include:
62+
- ruby-version: 2.7
63+
build-rails-versions: "5.2,6.0,6.1"
64+
- ruby-version: 3.3
65+
build-rails-versions: "7.0,7.1,7.2"
5966
steps:
6067
- uses: actions/checkout@v4
6168
with:
6269
submodules: true
6370
- name: fetch Rails tags
6471
working-directory: rails
6572
run: |
66-
for version in v7 v6 v5.2; do
67-
git fetch --depth=1 origin refs/tags/${version}*:refs/tags/${version}*
73+
for version in $(echo "${{ matrix.build-rails-versions }}" | tr ',' ' '); do
74+
git fetch --depth=1 origin refs/tags/v${version}*:refs/tags/v${version}*
6875
done
6976
- uses: ruby/setup-ruby@v1
7077
with:
71-
ruby-version: 2.7
78+
ruby-version: ${{ matrix.ruby-version }}
7279
bundler-cache: true
7380
- name: Doc Build
74-
run: rake build_multi
81+
run: rake 'build_multi[${{ matrix.build-rails-versions }}]'

0 commit comments

Comments
 (0)