A GitHub Action that consolidates multiple perl-actions/perl-versions@v2 calls into a single step, ensuring version consistency across targets.
Designed for workflows that run tests on multiple platforms (Linux, macOS, Windows) with the same set of Perl versions.
Rather than duplicating perl-versions call steps, this action fetches all requested version lists in one place.
jobs:
perl-versions:
uses: perl-actions/multi-target-perl-versions@v1
with:
since-perl: '5.14'
with-target-perl-tester: 'true'
with-target-macos: 'true'
with-target-windows-strawberry: 'true'
with-build-on: 'true'
build-job:
container:
image: perldocker/perl-tester:${{ steps.perl-versions.outputs.build-on }}
test-macos:
strategy:
matrix:
perl: ${{ fromJSON(steps.perl-versions.outputs.versions-target-macos) }}| Input | Default | Description |
|---|---|---|
since-perl |
5.10 |
Oldest Perl version to include (e.g. 5.8) |
until-perl |
(newest available) | Newest Perl version of target to include (e.g. 5.38) |
with-build-on |
false |
Fetch the newest perl-tester version for use as a build target |
with-target-perl |
true |
Fetch versions for the perl target |
with-target-perl-tester |
true |
Fetch versions for the perl-tester target |
with-target-macos |
false |
Fetch versions for the macos target |
with-target-windows-strawberry |
false |
Fetch versions for the windows-strawberry target |
| Output | Description |
|---|---|
build-on |
Newest perl-tester version; empty string when not requested |
versions-target-perl |
JSON array of versions for the perl target; [] when not requested |
versions-target-perl-tester |
JSON array of versions for the perl-tester target; [] when not requested |
versions-target-macos |
JSON array of versions for the macos target; [] when not requested |
versions-target-windows-strawberry |
JSON array of versions for the windows-strawberry target; [] when not requested |