File tree Expand file tree Collapse file tree 1 file changed +21
-4
lines changed Expand file tree Collapse file tree 1 file changed +21
-4
lines changed Original file line number Diff line number Diff line change 1
1
name : CI
2
2
on :
3
3
push :
4
- branches : [main]
4
+ # branches: [main]
5
5
pull_request :
6
6
jobs :
7
+ versions :
8
+ name : Get latest versions
9
+ runs-on : ubuntu-latest
10
+ strategy :
11
+ matrix :
12
+ product : ["ruby", "rails"]
13
+ outputs :
14
+ ruby : ${{ steps.supported.outputs.ruby }}
15
+ rails : ${{ steps.supported.outputs.rails }}
16
+ steps :
17
+ - id : supported
18
+ run : |
19
+ product="${{ matrix.product }}"
20
+ data=$(curl https://endoflife.date/api/$product.json)
21
+ supported=$(echo $data | jq '[.[] | select(.eol > (now | strftime("%Y-%m-%d")))]')
22
+ echo "${product}=$(echo $supported | jq -c 'map(.latest)')" >> $GITHUB_OUTPUT
7
23
test :
8
- name : Test on Ruby ${{ matrix.ruby }} and Rails ${{ matrix.rails }}
24
+ needs : versions
9
25
runs-on : ubuntu-latest
26
+ name : Test on Ruby ${{ matrix.ruby }} and Rails ${{ matrix.rails }}
10
27
strategy :
11
28
fail-fast : false
12
29
matrix :
13
- ruby : ['3.0', '3.1', '3.2', '3.3']
14
- rails : ['6.1.0', '7.0.0', '7.1.0']
30
+ ruby : ${{ fromJSON(needs.versions.outputs.ruby) }}
31
+ rails : ${{ fromJSON(needs.versions.outputs.rails) }}
15
32
env :
16
33
RAILS_VERSION : ${{ matrix.rails }}
17
34
steps :
You can’t perform that action at this time.
0 commit comments