Skip to content

Auto-update dependencies #16

Auto-update dependencies

Auto-update dependencies #16

Workflow file for this run

name: Auto-update dependencies
on:
schedule:
# Every day at 02:00 UTC
- cron: "0 2 * * *"
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
update-dependencies:
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 22
- name: Install dependencies
run: npm install
- name: Update dependencies
run: |
npm install -g npm-check-updates
# Update to latest minor+patch (non-breaking)
ncu -u --target minor
# Actually upgrade all resolutions in package-lock.json
npm install --legacy-peer-deps
- name: Create Pull Request
id: create-pr
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.PAT_TOKEN }}
commit-message: "chore: update dependencies"
title: "chore: update dependencies"
body: |
Automated dependency update.
This PR updates all dependencies in `package.json` and `package-lock.json`.
Please review and merge if all checks pass.
branch: chore/update-dependencies
delete-branch: true
- name: Enable auto-merge
if: steps.create-pr.outputs.pull-request-number
run: |
gh pr merge ${{ steps.create-pr.outputs.pull-request-number }} \
--auto \
--squash \
--delete-branch
env:
GH_TOKEN: ${{ secrets.PAT_TOKEN }}