-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 192e76b
Showing
20 changed files
with
30,280 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
root = true | ||
|
||
[*] | ||
indent_size = 2 | ||
charset = utf-8 | ||
indent_style = space | ||
end_of_line = lf | ||
insert_final_newline = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: check | ||
|
||
on: [push] | ||
|
||
jobs: | ||
META.json: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- run: npm install | ||
- run: npm run lint | ||
- run: npm run test | ||
- id: get-prereqs | ||
uses: ./ | ||
working-directory: test/corpus | ||
- run: echo $PREREQS | ||
env: | ||
PREREQS: ${{ steps.get-prereqs.prereqs }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/node_modules/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
# install-with-cpanm | ||
|
||
GitHub action to get prerequisites for a local CPAN distribution. | ||
|
||
```yaml | ||
- id: get-prereqs | ||
name: Get prerequisites | ||
uses: perl-actions/get-prereqs@v1 | ||
- name: Install prerequisites | ||
uses: perl-actions/install-with-cpanm@v1 | ||
with: | ||
install: ${{ steps.get-prereqs.prereqs }} | ||
``` | ||
## Inputs | ||
### `phases` | ||
|
||
List of phases to get prerequsites for, as defined in | ||
[CPAN::Meta::Spec](https://metacpan.org/pod/CPAN::Meta::Spec#Phases). | ||
|
||
Defaults to `build test runtime`. | ||
|
||
### `relationships` | ||
|
||
List of relationships to get prerequsites for, as defined in | ||
[CPAN::Meta::Spec](https://metacpan.org/pod/CPAN::Meta::Spec#Relationships). | ||
|
||
Defaults to `requires`. | ||
|
||
### `features` | ||
|
||
List of optional features to include prequisites for, as defined in | ||
[CPAN::Meta::Spec](https://metacpan.org/pod/CPAN::Meta::Spec#optional_features). | ||
|
||
Defaults to none. | ||
|
||
### `sources` | ||
|
||
List of files to search for prerequisites. Supported formats are: | ||
|
||
* [META files](https://metacpan.org/pod/CPAN::Meta::Spec) in JSON and YAML | ||
formats. | ||
* [`cpmfile`](https://metacpan.org/pod/Module::cpmfile) in JSON and YAML | ||
formats. | ||
* [`cpanfile`](https://metacpan.org/dist/Module-CPANfile/view/lib/cpanfile.pod) | ||
files as generated by [Module::CPANfile](https://metacpan.org/pod/Module::CPANfile) | ||
or [Dist::Zilla::Plugin::CPANFile](https://metacpan.org/pod/Dist::Zilla::Plugin::CPANFile). | ||
These files are parsed statically, files doing dynamic checks will not be | ||
supported. These files must be named `cpanfile`. | ||
* [Prereqs File](https://metacpan.org/pod/Dist::Zilla::Plugin::PrereqsFile) | ||
in JSON and YAML formats. These files must named `prereqs.yml` or | ||
`prereqs.json`. | ||
* `Makefile` as emitted by | ||
[ExtUtils::MakeMaker](https://metacpan.org/pod/ExtUtils::MakeMaker). This | ||
was used to communicated dependencies before `MYMETA` files were invented. | ||
|
||
|
||
|
||
Defaults to `MYMETA.json MYMETA.yml META.json META.yml Makefile cpanfile`. | ||
|
||
## Outputs | ||
|
||
### `perl` | ||
|
||
The perl version declared as a prerequisite. Formatted like `v5.30`. | ||
|
||
### `prereqs` | ||
|
||
The prerequisites declared including the required versions, formatted as | ||
expected by `cpanm` or `cpm`. | ||
|
||
### `prereqs-no-version` | ||
|
||
The prerequisites declared, not including the required versions. | ||
|
||
### `prereqsJSON` | ||
|
||
The prerequisites declared, formatted as a JSON string. The keys of the object | ||
will be the module name, and the values will be the versions required. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: "Get Prereqs from Dist" | ||
description: "Extracts the prereqs from a local dist" | ||
branding: | ||
icon: "arrow-right" | ||
color: "blue" | ||
|
||
inputs: | ||
phases: | ||
description: "The phases to get prerequisites for" | ||
required: false | ||
default: "build test runtime" | ||
relationships: | ||
description: "The relationships to get prerequisites for" | ||
required: false | ||
default: "requires" | ||
features: | ||
description: "The optional features to get prerequisites for" | ||
required: false | ||
default: "" | ||
sources: | ||
description: "Source files to check for prerequisites" | ||
required: false | ||
default: "MYMETA.json MYMETA.yml META.json META.yml Makefile cpanfile" | ||
|
||
outputs: | ||
perl: | ||
description: "The prerequisites formatted with a version in the syntax expected by cpanm or cpm" | ||
prereqs: | ||
description: "The prerequisites formatted with a version in the syntax expected by cpanm or cpm" | ||
prereqs: | ||
description: "The prerequisites formatted without a version as expected by CPAN.pm" | ||
prereqsJSON: | ||
description: "The prerequisites as a JSON string with modules as the keys and versions as the values" | ||
|
||
runs: | ||
using: "node20" | ||
main: "dist/main.js" |
Oops, something went wrong.