-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnodejs.yml
More file actions
42 lines (34 loc) · 960 Bytes
/
Copy pathnodejs.yml
File metadata and controls
42 lines (34 loc) · 960 Bytes
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
32
33
34
35
36
37
38
39
40
41
42
name: Continuous Dependency Updating
on:
schedule:
- cron: '0 0 * * *' # Run daily at 00:00 UTC
workflow_dispatch: # Allows manual triggering of the workflow
jobs:
update_dependencies:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: 14
- name: Install dependencies
run: |
npm ci
- name: Update dependencies
run: |
npm install -g npm-check-updates
ncu -u
npm install
- name: Run tests
run: |
npm install --save-dev jest
npm test
- name: Commit and push changes
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add package.json package-lock.json
git commit -m "Update dependencies via CDU" || exit 0
git push