-
Notifications
You must be signed in to change notification settings - Fork 7
55 lines (45 loc) · 1.61 KB
/
ncu.yaml
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
43
44
45
46
47
48
49
50
51
52
53
54
55
# Action to run "ncu -u" weekly and create a pull request with the changes.
name: Update packages with "npm-check-updates"
on:
schedule:
# Run weekly on day 0 at 00:00 UTC
- cron: "0 0 * * 0"
permissions:
contents: read
jobs:
update-dependencies:
permissions:
contents: write # to create branch (peter-evans/create-pull-request)
pull-requests: write # to create a PR (peter-evans/create-pull-request)
name: Update packages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: "18.15.0"
- name: Install "npm-check-updates"
run: npm install -g npm-check-updates
- name: Update packages
# ``unfetch`` is rejected here because its latest version is not compatible with our project
# ``rollup/plugin-commonjs`` is rejected because >26 breaks the tests
run: ncu --upgrade --reject unfetch --reject @rollup/plugin-commonjs
- name: Install them and update "package-lock.json"
run: npm install
- name: Build files with newer dependencies
run: npm run build
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
add-paths: |
package*.json
dist/readthedocs-addons.js*
title: |
Packages: updated via `ncu -u`
body: |
Packages: updated via `ncu -u`
commit-message: |
Packages: updated via `ncu -u`
delete-branch: true
branch: dependencies/ncu
branch-suffix: short-commit-hash