@@ -28,32 +28,40 @@ This action installs 'cpm' as root so you can then use it in your workflow.
28
28
29
29
## Using install-with-cpm in a GitHub workflow
30
30
31
- Here is a sample integration using install-with-cpm action
31
+ Here is a sample integration using ` install-with-cpm ` action
32
32
to test your Perl Modules using multiple Perl versions via the
33
- perl-tester images.
33
+ ` perl-tester ` images and the action ` perl-actions/perl-versions ` to rely on a dynamic list of available Perl versions .
34
34
35
35
``` yaml
36
36
# .github/workflows/linux.yml
37
37
jobs :
38
+
39
+ perl-versions :
40
+ runs-on : ubuntu-latest
41
+ name : List Perl versions
42
+ outputs :
43
+ perl-versions : ${{ steps.action.outputs.perl-versions }}
44
+ steps :
45
+ - id : action
46
+ uses : perl-actions/perl-versions@v1
47
+ with :
48
+ since-perl : v5.10
49
+ with-devel : false
50
+
38
51
perl_tester :
39
52
runs-on : ubuntu-latest
40
- name : " perl v${{ matrix.perl-version }}"
53
+ name : " Perl ${{ matrix.perl-version }}"
54
+ needs : [perl-versions]
41
55
42
56
strategy :
43
57
fail-fast : false
44
58
matrix :
45
- perl-version :
46
- - " 5.30"
47
- - " 5.28"
48
- - " 5.26"
49
- # ...
50
- # - '5.8'
59
+ perl-version : ${{ fromJson (needs.perl-versions.outputs.perl-versions) }}
51
60
52
- container :
53
- image : perldocker/perl-tester:${{ matrix.perl-version }}
61
+ container : perldocker/perl-tester:${{ matrix.perl-version }}
54
62
55
63
steps :
56
- - uses : actions/checkout@v3
64
+ - uses : actions/checkout@v4
57
65
- name : uses install-with-cpm
58
66
uses : perl-actions/install-with-cpm@v1
59
67
with :
@@ -242,10 +250,9 @@ windows:
242
250
choco install strawberryperl
243
251
echo "##[add-path]C:\strawberry\c\bin;C:\strawberry\perl\site\bin;C:\strawberry\perl\bin"
244
252
245
- - name: perl -V
246
- run: perl -V
253
+ - run: perl -V
247
254
248
- - uses: actions/checkout@v3
255
+ - uses: actions/checkout@v4
249
256
- name: "install-with-cpm"
250
257
251
258
uses: perl-actions/install-with-cpm@v1
0 commit comments