File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -12,13 +12,29 @@ permissions:
12
12
contents : read
13
13
14
14
jobs :
15
+ supportedVersions :
16
+ name : Fetch supported Go versions
17
+ runs-on : ubuntu-latest
18
+ outputs :
19
+ supported_versions : ${{ steps.matrix.outputs.supported_versions }}
20
+ steps :
21
+ - name : Checkout code
22
+ uses : actions/checkout@v4
23
+ - name : Read supported_go_versions.txt
24
+ id : matrix
25
+ run : |
26
+ versions=$(head -n 3 supported_go_versions.txt)
27
+ matrix="[$(echo "$versions" | sed 's/\(.*\)/"\1"/' | paste -s -d,)]"
28
+ echo "supported_versions=$matrix" >> $GITHUB_OUTPUT
29
+
15
30
test :
16
31
name : Tests
17
32
runs-on : ubuntu-latest
33
+ needs : supportedVersions
18
34
19
35
strategy :
20
36
matrix :
21
- go_version : ["1.20", "1.21", "1.22"]
37
+ go_version : ${{ fromJSON(needs.supportedVersions.outputs.supported_versions) }}
22
38
23
39
steps :
24
40
- name : Checkout code
You can’t perform that action at this time.
0 commit comments