-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: add workflow to update dependencies
- Loading branch information
1 parent
cdbf1ca
commit 2938f48
Showing
1 changed file
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Update dependencies | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: write | ||
pull_requests: write | ||
|
||
jobs: | ||
update: | ||
name: "Update all dependencies" | ||
|
||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20 | ||
|
||
- name: Keep npm cache around to speed up installs | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.OS }}-build-${{ hashFiles('**/package-lock.json') }} | ||
|
||
- name: Install dependencies | ||
run: npm ci --no-audit --ignore-scripts | ||
|
||
- name: Update dependencies | ||
run: npx npm-check-updates -u | ||
|
||
- name: Create Pull Request | ||
uses: peter-evans/create-pull-request@v5 | ||
with: | ||
commit-message: "fix: update dependencies" | ||
committer: "github-actions[bot] <actions@example.com>" | ||
author: "github-actions[bot] <actions@example.com>" | ||
branch: update-dependencies | ||
delete-branch: true | ||
title: "Update dependencies" | ||
body: "Updates the dependencies to the latest version" | ||
labels: enhancement |