Skip to content

Commit

Permalink
ci: add workflow to update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
coderbyheart committed Jun 21, 2023
1 parent cdbf1ca commit 2938f48
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/update-dependencies.yaml
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

0 comments on commit 2938f48

Please sign in to comment.