File tree Expand file tree Collapse file tree 1 file changed +29
-28
lines changed Expand file tree Collapse file tree 1 file changed +29
-28
lines changed Original file line number Diff line number Diff line change 37
37
uses : perl-actions/perl-versions@v1
38
38
with :
39
39
since-perl : v5.20
40
+ with-devel : false
40
41
41
42
# #
42
- # # Using perl-versions with perl-tester
43
+ # # Combining perl-versions with perl-tester
43
44
# #
44
45
test :
45
46
needs :
@@ -54,38 +55,38 @@ jobs:
54
55
steps :
55
56
- uses : actions/checkout@v4
56
57
- run : perl -V
58
+ # adjust that section to fit your distribution
59
+ # cpanm is available at that stage
60
+ - run : cpanm install .
61
+ - run : perl Makefile.PL
62
+ - run : make
63
+ - run : make test
57
64
58
65
```
59
66
60
- # Reusable workflow
67
+ ## Advanced Usages
61
68
62
- There is also reusable workflow simplifying call of this action.
69
+ ### Altering the values
63
70
64
- ## Inputs
65
-
66
- ### since-perl
67
-
68
- Forwarded to action.
69
-
70
- ## Outputs
71
-
72
- ### perl-version
73
-
74
- String containing JSON array with list of Perl versions.
75
-
76
- ## Usage
71
+ Here is an example to massage the Perl versions to append the string ` -buster ` to all ` 5.\d+ ` versions. (TIMTODY)
77
72
78
73
``` yaml
79
- jobs :
80
74
perl-versions :
81
- uses : perl-actions/perl-versions@v1
82
- with :
83
- since-perl : " 5.14"
84
-
85
- test :
86
- needs :
87
- - perl-versions
88
- strategy :
89
- matrix :
90
- perl-versions : ${{ fromJson (needs.perl-versions.outputs.perl-versions) }}
91
- ` ` `
75
+ runs-on : ubuntu-latest
76
+ name : List Perl versions
77
+ outputs :
78
+ perl-versions : ${{ steps.massage.outputs.perl-versions }}
79
+ steps :
80
+ - id : action
81
+ uses : perl-actions/perl-versions@v1
82
+ with :
83
+ since-perl : v5.10
84
+ with-devel : true
85
+ - id : massage
86
+ name : add buster
87
+ run : |
88
+ echo '${{ steps.action.outputs.perl-versions }}' > perl.versions
89
+ perl -pi -e 's/"(\d\.\d+)"/"$1-buster"/g' perl.versions
90
+ cat perl.versions
91
+ echo "perl-versions=$(cat perl.versions)" >> $GITHUB_OUTPUT
92
+ ` ` `
You can’t perform that action at this time.
0 commit comments