Skip to content

Update dependencies #518

Update dependencies

Update dependencies #518

name: Update dependencies
on:
workflow_dispatch:
schedule:
- cron: 00 01 * * *
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
update-dependencies:
runs-on: ubuntu-latest
if: ${{ github.repository_owner == 'djlint' }}
strategy:
matrix:
include:
- cmd: npm update --package-lock-only --lockfile-version 3
commit-msg: Update package-lock.json
branch: update/npm-lock
- cmd: pipx run pre-commit autoupdate
commit-msg: Update .pre-commit-config.yaml
branch: update/pre-commit-config
fail-fast: false
steps:
- uses: actions/checkout@v4
- run: ${{ matrix.cmd }}
- id: generate-token
uses: tibdex/github-app-token@v2
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.PRIVATE_KEY }}
- uses: peter-evans/create-pull-request@v7
with:
token: ${{ steps.generate-token.outputs.token }}
commit-message: ${{ matrix.commit-msg }}
branch: ${{ matrix.branch }}
delete-branch: true
sign-commits: true
title: ${{ matrix.commit-msg }}
body: