-
Notifications
You must be signed in to change notification settings - Fork 0
82 lines (70 loc) · 2.18 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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: npm update
on: workflow_dispatch
jobs:
npm-update-root:
name: npm update root
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Setup Node.js environment
uses: actions/setup-node@v4.2.0
- name: Checkout
uses: actions/checkout@v4
- name: Cache node deps
uses: actions/cache@v4
env:
cache-name: cache-node-deps
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
- name: npm update
run: |
npx npm-check-updates -u -x typescript,zone.js
npm install -f
npm update
npm install
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
token: '${{ secrets.GH_PAT }}'
add-paths: 'package*.json'
commit-message: npm update (root)
title: npm update (root)
branch: npm-update-root
author: 'github-actions <github-actions@github.com>'
npm-update-project:
name: npm update project
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Setup Node.js environment
uses: actions/setup-node@v4.2.0
- name: Checkout
uses: actions/checkout@v4
- name: Cache node deps
uses: actions/cache@v4
env:
cache-name: cache-node-deps
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
- name: npm update
working-directory: projects/ngx-kel-agent/
run: |
npx npm-check-updates -u
npm install -f
npm update
npm install
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
token: '${{ secrets.GH_PAT }}'
add-paths: 'projects/ngx-kel-agent/package*.json'
commit-message: npm update (project)
title: npm update (project)
branch: npm-update-project
author: 'github-actions <github-actions@github.com>'