Skip to content

Commit 7e05c10

Browse files
authored
Merge pull request #11 from ruby/ci-versions
Update Ruby versions on GHA with ci_versions/cruby.json
2 parents 34aa969 + 83282f4 commit 7e05c10

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

.github/workflows/test.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,21 @@ on:
77
pull_request:
88

99
jobs:
10+
ruby-versions:
11+
runs-on: ubuntu-latest
12+
outputs:
13+
versions: ${{ steps.versions.outputs.value }}
14+
steps:
15+
- id: versions
16+
run: |
17+
versions=$(curl -s 'https://cache.ruby-lang.org/pub/misc/ci_versions/cruby.json' | jq -c )
18+
echo "::set-output name=value::${versions}"
1019
test:
20+
needs: ruby-versions
1121
name: build (${{ matrix.ruby }} / ${{ matrix.os }})
1222
strategy:
1323
matrix:
14-
ruby: [ '3.0', 2.7, head ]
24+
ruby: ${{ fromJson(needs.ruby-versions.outputs.versions) }}
1525
os: [ ubuntu-latest, macos-latest ]
1626
runs-on: ${{ matrix.os }}
1727
steps:

0 commit comments

Comments
 (0)