Skip to content

Commit ebb8e6e

Browse files
authored
Add update-package-lock workflow (#762)
1 parent b83e763 commit ebb8e6e

2 files changed

Lines changed: 34 additions & 9 deletions

File tree

.github/workflows/release.yml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,8 @@ jobs:
88
timeout-minutes: 2
99
runs-on: ubuntu-latest
1010
steps:
11-
- name: Create GH Token
12-
uses: actions/create-github-app-token@v1
13-
id: gh-token
14-
with:
15-
app-id: ${{ vars.GH_TOKEN_APP_ID }}
16-
private-key: ${{ secrets.GH_TOKEN_APP_PRIVATE_KEY }}
1711
- name: Checkout
1812
uses: actions/checkout@v4
19-
with:
20-
persist-credentials: false
2113
- name: Setup Node
2214
uses: actions/setup-node@v4
2315
with:
@@ -28,6 +20,6 @@ jobs:
2820
- name: Semantic Release
2921
uses: ./.github/actions/semantic-release/
3022
with:
31-
GITHUB_TOKEN: ${{ steps.gh-token.outputs.token }}
23+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3224
NPM: true
3325
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Update package-lock.json
2+
on:
3+
schedule:
4+
- cron: "30 12 * * 1-5" # Mon-Fri 8:30AM EDT. 7:30AM EST.
5+
workflow_dispatch: # manual trigger
6+
jobs:
7+
update:
8+
name: Update
9+
timeout-minutes: 10
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Create GH Token
13+
uses: actions/create-github-app-token@v1
14+
id: gh-token
15+
with:
16+
app-id: ${{ vars.GH_TOKEN_APP_ID }}
17+
private-key: ${{ secrets.GH_TOKEN_APP_PRIVATE_KEY }}
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
with:
21+
token: ${{ steps.gh-token.outputs.token }}
22+
- name: Setup Node
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version-file: .nvmrc
26+
cache: npm
27+
- name: Update package-lock.json
28+
uses: BrightspaceUI/actions/update-package-lock@main
29+
with:
30+
AUTO_MERGE_METHOD: squash
31+
AUTO_MERGE_TOKEN: ${{ steps.gh-token.outputs.token }}
32+
APPROVAL_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
GITHUB_TOKEN: ${{ steps.gh-token.outputs.token }}

0 commit comments

Comments
 (0)