https://github.com/catho/catho-node-composite-action
A custom action to use in node applications
https://github.com/catho/catho-node-composite-action
Last synced: 6 months ago
JSON representation
A custom action to use in node applications
- Host: GitHub
- URL: https://github.com/catho/catho-node-composite-action
- Owner: catho
- Created: 2021-12-28T17:40:25.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-04-19T21:12:08.000Z (over 3 years ago)
- Last Synced: 2025-04-28T21:45:48.411Z (about 1 year ago)
- Size: 6.84 KB
- Stars: 0
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# catho-node-composite-action
A custom action to use in node applications.
## Why
The jobs of github actions don't give support to reuse steps between them, so the alternative is build a composite action to reuse on every steps.
Instead to write 4 or 5 steps in every jobs of your pipeline you cand just use this custom action.
## Featrues
- use `actions/setup-node@v3`;
- does application checkout using `actions/checkout@v3`;
- create a `.npmrc` file in case you pass `npm-token` parameter;
- run `npm install`.
## Inputs
- `npm-token`: Used to create `.npmrc` file in case you have some private dependency
## Outputs
There no outputs yet.
## How to use
```yaml
name: Some API
on: [push]
jobs:
linter:
timeout-minutes: 10
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
steps:
- name: Setup application
uses: catho/catho-node-composite-action@v2
with:
npm-token: you npm token
working-directory: ./
- name: Run linter
run: npm run lint
tests:
timeout-minutes: 10
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
steps:
- name: Setup application
uses: catho/catho-node-composite-action@v2
- name: Run all tests
run: npm run test
```