Skip to content

ServerlessOpsIO/gha-setup-node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

gha-setup-node

This GitHub Action sets up a NodeJS environment for use in workflows.

NOTE: This workflow is opinionated and meets the needs of its author. It is provided publicly as a reference for others to use and modify as needed.

This action will perform the following actions:

  • Install nodejs
  • Enable Yarn
  • Install dependencies

Usage

See below for inputs, outputs, and examples.

Inputs

Note: either node_version or node_version_file must be set but not both.

  • node_version (optional): The version of NodeJS to use.
  • node_version_file (optional): The file to read the NodeJS version from.

Outputs

  • node-version: he installed NodeJS version. Useful when given a version range as input.
  • cache-hit: A boolean value to indicate a cache entry was found

Examples

To use this action, add the following step to your workflow:

steps:
  - name: Checkout code
    uses: ServerlessOpsIO/gha-setup-workspace@v1

  - name: Setup NodeJS environment
    uses: ServerlessOpsIO/gha-setup-node@v1
    with:
      node_version: 'lts/*'

Contributing

Contributions are welcome! Please open an issue or submit a pull request for any changes.

Contact

For any questions or support, please open an issue in this repository.

About

Github Action to setup NodeJS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published