Skip to content

Commit 8d555e2

Browse files
authored
Merge pull request #57 from happy-barney/hpb/use-perl-verions
Use perl-actions/perl-versions to build perl-versions matrix
2 parents e6f2ca8 + aafd636 commit 8d555e2

File tree

2 files changed

+31
-36
lines changed

2 files changed

+31
-36
lines changed

.github/workflows/publish-to-docker.yml

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,18 @@ on:
1010
workflow_dispatch:
1111

1212
jobs:
13+
prepare-matrix:
14+
runs-on: ubuntu-latest
15+
name: List perl versions
16+
outputs:
17+
perl-versions: ${{ steps.action.outputs.perl-versions }}
18+
steps:
19+
- name: Perl versions action step
20+
id: action
21+
uses: perl-actions/perl-versions@main
22+
with:
23+
since-perl: '5.8'
24+
with-devel: 'true'
1325

1426
latest-build:
1527
name: "Build latest"
@@ -29,28 +41,13 @@ jobs:
2941
build:
3042
name: "Build versions"
3143
runs-on: ubuntu-latest
44+
needs:
45+
- prepare-matrix
3246

3347
strategy:
3448
fail-fast: false
3549
matrix:
36-
perl-version:
37-
- "devel"
38-
- "5.38"
39-
- "5.36"
40-
- "5.34"
41-
- "5.32"
42-
- "5.30"
43-
- "5.28"
44-
- "5.26"
45-
- "5.24"
46-
- "5.22"
47-
- "5.20"
48-
- "5.18"
49-
- "5.16"
50-
- "5.14"
51-
- "5.12"
52-
- "5.10"
53-
- "5.8"
50+
perl-version: ${{ fromJson (needs.prepare-matrix.outputs.perl-versions) }}
5451

5552
steps:
5653
- uses: actions/checkout@v4

.github/workflows/test-cpanfile.yml

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,31 +7,29 @@ on:
77
- '*'
88
workflow_dispatch:
99
jobs:
10+
prepare-matrix:
11+
runs-on: ubuntu-latest
12+
name: List perl versions
13+
outputs:
14+
perl-versions: ${{ steps.action.outputs.perl-versions }}
15+
steps:
16+
- name: Perl versions action step
17+
id: action
18+
uses: perl-actions/perl-versions@main
19+
with:
20+
since-perl: '5.8'
21+
with-devel: 'true'
22+
1023
test-job:
1124
runs-on: ubuntu-latest
25+
needs:
26+
- prepare-matrix
1227
container:
1328
image: perl:${{ matrix.perl-version }}-buster
1429
strategy:
1530
fail-fast: false
1631
matrix:
17-
perl-version:
18-
- 'devel'
19-
- '5.38'
20-
- '5.36'
21-
- '5.34'
22-
- '5.32'
23-
- '5.30'
24-
- '5.28'
25-
- '5.26'
26-
- '5.24'
27-
- '5.22'
28-
- '5.20'
29-
- '5.18'
30-
- '5.16'
31-
- '5.14'
32-
- '5.12'
33-
- '5.10'
34-
- '5.8'
32+
perl-version: ${{ fromJson (needs.prepare-matrix.outputs.perl-versions) }}
3533
name: Perl ${{ matrix.perl-version }}
3634
steps:
3735
- uses: actions/checkout@v4

0 commit comments

Comments
 (0)