Skip to content
download

GitHub Action

Update NPM packages

v0.1.1 Latest version

Update NPM packages

download

Update NPM packages

Create pull requests for the latest version of NPM packages

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Update NPM packages

uses: msudgh/actions-npm-check-updates@v0.1.1

Learn more about this action in msudgh/actions-npm-check-updates

Choose a version

GitHub tag (latest SemVer) MIT License

Create pull requests for the latest version of NPM packages

Usage

Here is an example workflow to update NPM packages with scheduled runs:

name: Update NPM packages

on:
  # Allow manual triggers.
  workflow_dispatch:

  # Automatically run once a week.
  schedule:
    - cron: "0 0 1 * SAT"

jobs:
  update-packages:
    runs-on: ubuntu-latest
    steps:
      - name: Update packages
        uses: msudgh/actions-npm-check-updates@v0.1.2

Inputs

Name Description Default
node-version Node.js version for the updater 18.16.0
npm-version NPM version for the updater 1.2.2
base-branch Git branch name as the base main
pr-body The body of the pull request Automated changes by actions-npm-check-updates GitHub action

An example of using the inputs:

name: Update NPM packages

on:
  # Allow manual triggers.
  workflow_dispatch:

  # Automatically run once a week.
  schedule:
    - cron: "0 0 1 * SAT"

jobs:
  update-packages:
    runs-on: ubuntu-latest
    steps:
      - name: Update packages
        uses: msudgh/actions-npm-check-updates@v0.1.2
        with:
          node-version: 18.16.0
          npm-version: 1.2.2
          base-branch: main
          pr-body: |
            Automated changes by actions-npm-check-updates