Skip to content

perl-actions/install-with-cpm

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Actions Status

install-cpm

GitHub action to install App::cpm

This action installs 'cpm' as root so you can then use it in your workflow.

Inputs

install

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

cpanfile

Install modules from a cpanfile.

tests

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

global

Boolean variable used to install or not modules to @INC instead of local. This variable controls the -g option from cpm and is enabled by default.

Possible values: true | false [default: true]

args

Extra arguments to pass to the cplay command line.

sudo

Run commands as sudo: true | false [default: true]

perl

Which perl path to use. Default to use perl from the current PATH.

path

Where to install cpm. Default value is $Config{installsitescript}/cpm.

version

Which version/tag of cpm to install. Default is 'master' to use the latest version.

Outputs

none

Example usage

Install cpm

Just install cpm without running any install commands. You can then use cpm yourself in order commands.

- name: install cpm
  uses: perl-actions/install-cpm@v1.1
# then you can use it
- run: 'sudo cpm install -g Simple::Accessor'

Install a single module

- name: install cpm and one module
  uses: perl-actions/install-cpm@v1.1
  with:
    install: 'Simple::Accessor'

Install multiple modules

List modules seperated by a newline character \n

- name: install cpm and multiple modules
  uses: perl-actions/install-cpm@v1.1
  with:
      install: |
        Simple::Accessor
        Test::Parallel

Install modules from a cpanfile

- name: install cpm and files from cpanfile
  uses: perl-actions/install-cpm@v1.1
  with:
    cpanfile: 'your-cpanfile'

Install a module and enable tests

Install modules with tests.

- name: install cpm and files from cpanfile
  uses: perl-actions/install-cpm@v1.1
  with:
      install: 'Simple::Accessor'
      tests: true

Install module(s) to local directory

Disable the -g flag.

- name: install cpm and files from cpanfile
  uses: perl-actions/install-cpm@v1.1
  with:
      install: 'Simple::Accessor'
      global: false
      sudo: false

Use some custom args to install

- name: 'install cpm + cpanfile with args'
  uses: perl-actions/install-cpm@v1.1
  with:
      cpanfile: 'your-cpanfile'
      args: '--with-recommends --with-suggests'

About

GitHub action to install Perl modules using App::cpm

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 6