Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jaid/action-npm-install
GitHub Action for installing dependencies from package.json after checkout.
https://github.com/jaid/action-npm-install
action actions dependencies dependency github-action github-actions install node node-modules nodejs npm pnpm utility workflow yarn
Last synced: about 2 months ago
JSON representation
GitHub Action for installing dependencies from package.json after checkout.
- Host: GitHub
- URL: https://github.com/jaid/action-npm-install
- Owner: Jaid
- License: mit
- Created: 2019-11-19T15:50:04.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2023-03-02T23:50:44.000Z (almost 2 years ago)
- Last Synced: 2024-11-22T03:44:33.069Z (about 2 months ago)
- Topics: action, actions, dependencies, dependency, github-action, github-actions, install, node, node-modules, nodejs, npm, pnpm, utility, workflow, yarn
- Language: JavaScript
- Homepage: https://github.com/Jaid/action-npm-install
- Size: 4.59 MB
- Stars: 9
- Watchers: 3
- Forks: 4
- Open Issues: 6
-
Metadata Files:
- Readme: readme.md
- Funding: .github/funding.yml
- License: license.txt
Awesome Lists containing this project
README
# action-npm-install
**GitHub Action for installing Node dependencies from package.json with the correct package manager automatically selected.**
This is usually needed to prepare for other steps in a GitHub Actions workflow.
## Example
Example workflow that runs whenever commits are pushed on branch `master`.
`.github/workflows/example.yml`
```yaml
name: Try installing Node dependencies
on:
push:
branches: [master]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: actions/checkout
uses: actions/checkout@v2.0.0
- name: actions/setup-node
uses: actions/setup-node@v1.4.1
with:
node-version: "13.9.0"
- name: npm install
uses: jaid/action-npm-install@v1.2.1
```## Options
Default
InfonodeEnv
development
NODE_ENV setting for installing execution (affects the amount of dependencies installed, but I would recommend keeping development in any case).packageManager
auto
Can be "npm", "yarn", "pnpm" or "auto". "auto" will determine the package manager by looking into the repo's files. This is very accurate, so you normally don't want to change this.skipIfNodeModulesExists
false
If true and node_modules folder already exists, this action will be skipped assuming npm install is not required.## Development
Setting up:
```bash
git clone git@github.com:jaid/action-npm-install.git
cd action-npm-install
npm install
```## License
[MIT License](https://raw.githubusercontent.com/jaid/action-npm-install/master/license.txt)
Copyright © 2020, Jaid \ (https://github.com/jaid)