Skip to content

Instantly share code, notes, and snippets.

@daffl
Created April 14, 2020 18:30
Show Gist options
  • Save daffl/fcf96ea7f71a515028883b68aab2cb21 to your computer and use it in GitHub Desktop.
Save daffl/fcf96ea7f71a515028883b68aab2cb21 to your computer and use it in GitHub Desktop.
GitHub action that updates all dependencies once a week
{
"scripts": {
"update-dependencies": "ncu -u"
},
"devDependencies": {
"npm-check-updates": "^4.1.2"
}
}
on:
schedule:
- cron: '0 0 * * 0'
name: Update packages
jobs:
release:
name: Update npm packages
runs-on: ubuntu-latest
steps:
- name: Update npm packages
uses: technote-space/create-pr-action@v2.0.3
with:
EXECUTE_COMMANDS: |
npm run update-dependencies
npm install
COMMIT_MESSAGE: 'chore(dependencies): Update all dependencies'
COMMIT_NAME: 'GitHub Actions'
COMMIT_EMAIL: 'user@example.com'
PR_BRANCH_NAME: 'chore-npm-update-${PR_ID}'
PR_TITLE: 'chore(dependencies): Update all dependencies'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment