-
Notifications
You must be signed in to change notification settings - Fork 0
31 lines (28 loc) · 1.12 KB
/
update.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
name: Update dependencies
on:
schedule:
- cron: "00 23 * * 6"
workflow_dispatch:
jobs:
update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Using Node 14
uses: actions/setup-node@v1
with:
node-version: 14
- name: Update npm version to latest
run: npm install -g npm@latest # stop showing warnings about the lockfile
- name: Install dependencies
run: npm install
- name: Update to the latest minor/patch version
run: npx npm-check-updates -u --target minor
- name: Install updated dependencies & update lockfile
run: npm install && npm update
- name: Push changes
run: |
git config --global user.name "github-actions"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git diff --quiet && git diff --staged --quiet || git commit -am "$(date +%F) updated dependencies"
git push