Skip to content

Latest commit

 

History

History
158 lines (117 loc) · 3.06 KB

README.md

File metadata and controls

158 lines (117 loc) · 3.06 KB

Actions Status

install-with-cnext

Basic Usage using system Perl

GitHub action to install a perl distribution using App::cnext

jobs:
  cnext:
    runs-on: ubuntu-latest
    name: "cnext"
    steps:
      - name: Install multiple modules
        uses: perl-actions/[email protected]
        with:
          install: |
            First::Module
            Second::Module

Using Perl Tester

jobs:
  perl:
    runs-on: ubuntu-latest

    strategy:
      fail-fast: false
      matrix:
        perl-version:
          - "5.30"
          - "5.28"

    container:
      image: perldocker/perl-tester:${{ matrix.perl-version }}

    steps:
      # no need to checkout
      #- uses: actions/checkout@v2

      - name: perl -V
        run: perl -V

      - name: "install-with-cnext"
        uses: perl-actions/[email protected]
        with:
          sudo: false
          install: |
            First::Module
            Second::Module

Inputs

install

List of one or more modules, separated by a newline \n character.

cpanfile

Install modules from a cpanfile.

tarball

Install a distribution from a tarball URL or Path.

tests

Boolean variable used to disable unit tests during installation Possible values: true | false [default: true]

args

Extra arguments to pass to the cnext command line.

Outputs

none

Example usage

Install one module or distribution

- name: Install one module
  uses: perl-actions/[email protected]
  with:
    install: Module::One

You can use either a module name or a distribution name

- name: Install one distribution
  uses: perl-actions/[email protected]
  with:
    install: Distribution-Name

Install multiple modules

To install more than a single module, use a string seperated by \n character.

- name: Install multiple modules
  uses: perl-actions/[email protected]
  with:
    install: |
    	Module::One
      Another::Module

Install using a cpanfile

You can use a cpanfile to install multiple modules.

- name: Install using a cpanfile
  uses: perl-actions/[email protected]
  with:
    cpanfile: "your-cpanfile"

you can also requests some specific rules using the extra args argument.

- name: Install using a cpanfile
  uses: perl-actions/[email protected]
  with:
    cpanfile: "your-cpanfile"
    args: "--with-recommends --with-requires"

Install from a tarball

install_from_tarball:
  runs-on: ubuntu-latest
  name: "Install from tarball"
  steps:
    - name: install-with-cnext --from-tarball
      uses: perl-actions/[email protected]
      with:
        tarball: "https://github.com/${{ github.repository }}/archive/p5.tar.gz"

Disabling Unit tests during installation

- name: Install multiple modules
  uses: perl-actions/[email protected]
  with:
    install: My::Module
    tests: false