-
Notifications
You must be signed in to change notification settings - Fork 10k
74 lines (64 loc) · 2.47 KB
/
update-npm-dependencies.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
name: update-npm-dependencies
on:
# Manual run
workflow_dispatch:
pull_request:
permissions:
contents: write
issues: write
pull-requests: write
jobs:
update-npm-dependencies:
runs-on: windows-latest
steps:
- name: Checkout aspnetcore repository
uses: actions/checkout@v2
with:
repository: 'dotnet/aspnetcore'
ref: 'main'
path: 'aspnetcore'
- name: Checkout Node-Externals repository
uses: actions/checkout@v2
with:
repository: 'dotnet/Node-Externals'
ref: 'main'
path: 'node-externals'
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Run script
shell: pwsh
id: update-npm-dependencies
run: ./.github/workflows/update-npm-dependencies.ps1
- name: Create PR to update the offline package cache
# if: steps.update-npm-dependencies.outputs.changes == 'true'
id: update-offline-package-cache
uses: dotnet/actions-create-pull-request@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
path: ./node-externals/
commit-message: 'Update the NPM offline cache'
title: '[Infrastructure] Update the NPM offline cache'
body: 'Updates the npm offline cache to match the associated package-lock.json file in dotnet/aspnetcore.'
labels: 'Type: Dependency Update :arrow_up_small:'
base: main
branch: github-action/update-npm-dependencies
branch-suffix: timestamp
- name: Update offline-cache submodule
shell: pwsh
run:
./.github/workflows/update-submodule-commit.ps1 ${{ steps.update-offline-package-cache.outputs.pull-request-head-sha }}
- name: Create PR to update package-lock.json and the offline package cache submodule
# if: steps.update-npm-dependencies.outputs.changes == 'true'
uses: dotnet/actions-create-pull-request@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: 'Update npm dependencies and offline cache submodule'
path: ./aspnetcore/
title: '[Infrastructure] Update npm dependencies'
body: 'Updates the package-lock.json file and the offline package cache submodule to match it.'
labels: 'Type: Dependency Update :arrow_up_small:'
base: main
branch: github-action/update-npm-dependencies
branch-suffix: timestamp