All Projects → taichi → Actions Package Update

taichi / Actions Package Update

keeps npm dependencies up-to-date by making pull requests from GitHub Actions or CI.

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Actions Package Update

Package.json
文件 package.json 的说明文档。
Stars: ✭ 67 (+86.11%)
Mutual labels:  npm, npm-package, yarn
Synp
Convert yarn.lock to package-lock.json and vice versa
Stars: ✭ 510 (+1316.67%)
Mutual labels:  npm, npm-package, yarn
Np
A better `npm publish`
Stars: ✭ 6,401 (+17680.56%)
Mutual labels:  npm, npm-package, yarn
Ngx Smart Modal
Modal/Dialog component crafted for Angular
Stars: ✭ 256 (+611.11%)
Mutual labels:  npm, npm-package, yarn
React Use Api
Async HTTP request data for axios. Designed for diverse UI states, SSR and data pre-caching.
Stars: ✭ 49 (+36.11%)
Mutual labels:  npm, npm-package, yarn
Yarpm
CLI tool to run npm scripts with either npm or yarn, depending on how it was started
Stars: ✭ 13 (-63.89%)
Mutual labels:  npm, npm-package, yarn
Salus
Security scanner coordinator
Stars: ✭ 441 (+1125%)
Mutual labels:  npm, yarn
Npm Gui
Graphic tool for managing javascript project dependencies - in a friendly way.
Stars: ✭ 454 (+1161.11%)
Mutual labels:  npm, yarn
Vanilla Framework
From community websites to web applications, this CSS framework will help you achieve a consistent look and feel.
Stars: ✭ 476 (+1222.22%)
Mutual labels:  npm, npm-package
Cpx
A cli tool to watch and copy file globs.
Stars: ✭ 394 (+994.44%)
Mutual labels:  npm, npm-package
Rando.js
The world's easiest, most powerful random function.
Stars: ✭ 659 (+1730.56%)
Mutual labels:  npm, npm-package
Eslint Plugin Node
Additional ESLint's rules for Node.js
Stars: ✭ 740 (+1955.56%)
Mutual labels:  npm, npm-package
Npm Run All
A CLI tool to run multiple npm-scripts in parallel or sequential.
Stars: ✭ 4,496 (+12388.89%)
Mutual labels:  npm, npm-package
Node Thermal Printer
This npm package was made to control epson and star thermal printers
Stars: ✭ 424 (+1077.78%)
Mutual labels:  npm, npm-package
Typac
install npm packages along with corresponding typings
Stars: ✭ 29 (-19.44%)
Mutual labels:  npm, yarn
Lockfile Lint
Lint an npm or yarn lockfile to analyze and detect security issues
Stars: ✭ 411 (+1041.67%)
Mutual labels:  npm, yarn
Yarn Package Boilerplate
An Yarn package with babel, jest, flow, prettier and more
Stars: ✭ 10 (-72.22%)
Mutual labels:  npm, yarn
Install Self Peers
Stars: ✭ 26 (-27.78%)
Mutual labels:  npm, yarn
Npm Script Naming Ideas
Ideas for naming npm scripts
Stars: ✭ 12 (-66.67%)
Mutual labels:  npm, yarn
Awesome Npm
Awesome npm resources and tips
Stars: ✭ 3,894 (+10716.67%)
Mutual labels:  npm, yarn

actions-package-update

This tool keeps npm dependencies up-to-date by making pull requests from GitHub Actions or CI.

actions-package-update

This tool successor of taichi/ci-yarn-upgrade.

Basic Usage

GitHub Action for package.json update.

GitHub Actions

below is the complete workflow example.

on:
  schedule:
  - cron: 0 0 * * 3
name: Update
jobs:
  package-update:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/[email protected]
    - name: set remote url
      run: git remote set-url --push origin https://$GITHUB_ACTOR:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
    - name: package-update
      uses: taichi/[email protected]
      env:
        AUTHOR_EMAIL: [email protected]
        AUTHOR_NAME: john
        EXECUTE: "true"
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        LOG_LEVEL: debug
      with:
        args: -u --packageFile package.json --loglevel verbose

Examples

  • Update devDependencies only

    - name: package-update
      uses: taichi/[email protected]
      env:
        AUTHOR_EMAIL: [email protected]
        AUTHOR_NAME: John
        EXECUTE: "true"
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      with:
        args: -u --packageFile package.json  --dep dev
    
  • Use yarn upgrade

    - name: package-update
      uses: taichi/[email protected]
      env:
        AUTHOR_EMAIL: [email protected]
        AUTHOR_NAME: John
        EXECUTE: "true"
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        UPDATE_COMMAND: yarn
      with:
        args: upgrade --latest
    
  • Use npm update

    - name: package-update
      uses: taichi/[email protected]
      env:
        AUTHOR_EMAIL: [email protected]
        AUTHOR_NAME: John
        EXECUTE: "true"
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        UPDATE_COMMAND: npm
      with:
        args: update
    
  • Use ncu with yarn workspaces

    In your workspace root run:

    yarn add -DW wsrun npm-check-updates
    

    Add this script to your root package.json:

    {
      "ncu-all": "ncu -u --packageFile package.json && wsrun --serial ncu -u --packageFile package.json"
    }
    

    Add this config:

    - name: package-update
      uses: taichi/[email protected]
      env:
        AUTHOR_EMAIL: [email protected]
        AUTHOR_NAME: John
        EXECUTE: "true"
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        UPDATE_COMMAND: yarn
      with:
        args: ncu-all
    

Local or CI Server|Service

Install

yarn global add actions-package-update

or

npm install actions-package-update -g

Setting Environment Variables

  • Required Variables
    • GITHUB_TOKEN
    • AUTHOR_NAME and AUTHOR_EMAIL
      • this command use there variables for commit
    • EXECUTE
      • By default, actions-package-update runs in dry-run mode.
      • if you set to EXECUTE=true, then this command push branch to remote, and make a pull request.

Command Behavior

this command works locally and output result to standard output.

CLI Output

Optional Configurations

  • BRANCH_PREFIX
    • specify working branch prefix. default prefix is package-update/.
  • COMMIT_MESSAGE
    • specify the commit message. default message is update dependencies.
  • COMMIT_FILES
    • a space separated list of files that will be added to the commit. Leave empty to use git add --all.",
      • for example, you can use "package.json package-lock.json" to ensure only these two files gets added to the commit
  • UPDATE_COMMAND
    • specify the command for update. default command is ncu.
      • for example, you may set to yarn or npm.
  • WITH_SHADOWS
    • if you specify this option, shows shadow dependencies changes.
    • default value is false.
  • KEEP
    • if you specify this option, keep working branch after all.
    • default value is false.
    • this is usefull for debug.
  • LOG_LEVEL
    • One of fatal, error, warn, info, debug, trace or silent.
    • default value is info.
    • if you want to know this tool's internal states, set to debug.
  • WORKING_DIR
    • specify the working dir.
    • default value is ./.
  • SET_NODE_VERSION
    • specify the node version you want to run on.
    • default value is latest.

for developers

setup

execute below commands on project root dir.

yarn install
code .

release

  • release package to npmjs

    yarn publish

  • edit Dockerfile

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].