Skip to content

Commit

Permalink
Merge pull request #24 from perl-actions/multiple-improvements
Browse files Browse the repository at this point in the history
Multiple improvements to cpm
  • Loading branch information
atoomic authored Apr 25, 2024
2 parents dcfb65d + 1f8559e commit 8b1a984
Show file tree
Hide file tree
Showing 656 changed files with 32,080 additions and 133,941 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: check

on: [push]
on: [push, pull_request]

jobs:
# note using ./ is a trick to be sure to use @master
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/lint-javascript.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Lint javascript
on:
push:
paths:
- '*.js'
- '.github/workflows/lint-javascript.yml'
- 'eslint.config.js'
- 'package*'
pull_request:
paths:
- '*.js'
- '.github/workflows/lint-javascript.yml'
- 'eslint.config.js'
- 'package*'
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: npm ci
- name: Lint javascript
run: npm run lint
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/node_modules/
25 changes: 13 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[![Actions Status](https://github.com/perl-actions/install-with-cpm/workflows/check/badge.svg)](https://github.com/perl-actions/install-with-cpm/actions)
[![Actions Status](https://github.com/perl-actions/install-with-cpm/workflows/check/badge.svg)](https://github.com/perl-actions/install-with-cpm/actions) [![Lint javascript](https://github.com/perl-actions/i
nstall-with-cpm/actions/workflows/lint-javascript.yml/badge.svg)](https://github.com/perl-actions/install-with-cpm/actions/workflows/lint-javascript.yml)

# install-with-cpm

Expand All @@ -8,7 +9,7 @@ This action installs 'cpm' as root so you can then use it in your workflow.

```yaml
- name: install cpm and multiple modules
uses: perl-actions/install-with-cpm@stable
uses: perl-actions/install-with-cpm@v1
with:
install: |
Simple::Accessor
Expand Down Expand Up @@ -54,7 +55,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: uses install-with-cpm
uses: perl-actions/install-with-cpm@stable
uses: perl-actions/install-with-cpm@v1
with:
cpanfile: "cpanfile"
sudo: false
Expand Down Expand Up @@ -131,7 +132,7 @@ You can then use cpm yourself in order commands.

```yaml
- name: install cpm
uses: perl-actions/install-with-cpm@stable
uses: perl-actions/install-with-cpm@v1
# then you can use it
- run: "sudo cpm install -g Simple::Accessor"
```
Expand All @@ -143,7 +144,7 @@ You can then use cpm yourself in order commands.

```yaml
- name: install cpm
uses: perl-actions/install-with-cpm@stable
uses: perl-actions/install-with-cpm@v1
with:
version: "0.990"
```
Expand All @@ -152,7 +153,7 @@ You can then use cpm yourself in order commands.

```yaml
- name: install cpm and one module
uses: perl-actions/install-with-cpm@stable
uses: perl-actions/install-with-cpm@v1
with:
install: "Simple::Accessor"
```
Expand All @@ -163,7 +164,7 @@ List modules seperated by a newline character `\n`

```yaml
- name: install cpm and multiple modules
uses: perl-actions/install-with-cpm@stable
uses: perl-actions/install-with-cpm@v1
with:
install: |
Simple::Accessor
Expand All @@ -174,7 +175,7 @@ List modules seperated by a newline character `\n`

```yaml
- name: install cpm and files from cpanfile
uses: perl-actions/install-with-cpm@stable
uses: perl-actions/install-with-cpm@v1
with:
cpanfile: "your-cpanfile"
```
Expand All @@ -185,7 +186,7 @@ Install modules with tests.

```yaml
- name: install cpm and files from cpanfile
uses: perl-actions/install-with-cpm@stable
uses: perl-actions/install-with-cpm@v1
with:
install: "Simple::Accessor"
tests: true
Expand All @@ -197,7 +198,7 @@ Disable the `-g` flag.

```yaml
- name: install cpm and files from cpanfile
uses: perl-actions/install-with-cpm@stable
uses: perl-actions/install-with-cpm@v1
with:
install: "Simple::Accessor"
global: false
Expand All @@ -208,7 +209,7 @@ Disable the `-g` flag.

```yaml
- name: "install cpm + cpanfile with args"
uses: perl-actions/install-with-cpm@stable
uses: perl-actions/install-with-cpm@v1
with:
cpanfile: "your-cpanfile"
args: "--with-recommends --with-suggests"
Expand Down Expand Up @@ -247,7 +248,7 @@ windows:
- uses: actions/checkout@v3
- name: "install-with-cpm"
uses: perl-actions/install-with-cpm@stable
uses: perl-actions/install-with-cpm@v1
with:
install: |
abbreviation
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@ inputs:

runs:
using: "node20"
main: "index.js"
main: "dist/index.js"
Loading

0 comments on commit 8b1a984

Please sign in to comment.