@@ -28,32 +28,40 @@ This action installs 'cpm' as root so you can then use it in your workflow.
2828
2929## Using install-with-cpm in a GitHub workflow
3030
31- Here is a sample integration using install-with-cpm action
31+ Here is a sample integration using ` install-with-cpm ` action
3232to 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 .
3434
3535``` yaml
3636# .github/workflows/linux.yml
3737jobs :
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+
3851 perl_tester :
3952 runs-on : ubuntu-latest
40- name : " perl v${{ matrix.perl-version }}"
53+ name : " Perl ${{ matrix.perl-version }}"
54+ needs : [perl-versions]
4155
4256 strategy :
4357 fail-fast : false
4458 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) }}
5160
52- container :
53- image : perldocker/perl-tester:${{ matrix.perl-version }}
61+ container : perldocker/perl-tester:${{ matrix.perl-version }}
5462
5563 steps :
56- - uses : actions/checkout@v3
64+ - uses : actions/checkout@v4
5765 - name : uses install-with-cpm
5866 uses : perl-actions/install-with-cpm@v1
5967 with :
@@ -242,10 +250,9 @@ windows:
242250 choco install strawberryperl
243251 echo "##[add-path]C:\strawberry\c\bin;C:\strawberry\perl\site\bin;C:\strawberry\perl\bin"
244252
245- - name: perl -V
246- run: perl -V
253+ - run: perl -V
247254
248- - uses: actions/checkout@v3
255+ - uses: actions/checkout@v4
249256 - name: "install-with-cpm"
250257
251258 uses: perl-actions/install-with-cpm@v1
0 commit comments