From 864883c3b847c8abd98bbf360b65e8a41cb316c8 Mon Sep 17 00:00:00 2001 From: Simon Emms Date: Tue, 10 Nov 2026 12:51:33 +0000 Subject: [PATCH] ci: add update dependencies workflow Signed-off-by: Simon Emms --- .github/workflows/update-dependencies.yml | 64 +++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 .github/workflows/update-dependencies.yml diff --git a/.github/workflows/update-dependencies.yml b/.github/workflows/update-dependencies.yml new file mode 100644 index 0000000..7a418b2 --- /dev/null +++ b/.github/workflows/update-dependencies.yml @@ -0,0 +1,64 @@ +name: Update Dependencies + +on: + schedule: + - cron: "0 0 1 * *" + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: update-dependencies + cancel-in-progress: false + +jobs: + update-dependencies: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v7 + with: + fetch-depth: 0 + + - name: Set up Python + uses: actions/setup-python@v7 + with: + python-version: 3.x + + - name: Update pre-commit dependencies + run: | + python -m pip install pre-commit + pre-commit autoupdate + + - name: Set up Node + uses: actions/setup-node@v7 + with: + node-version: lts/* + cache: npm + cache-dependency-path: package-lock.json + + - name: Update npm dependencies + run: | + npm ci + npm update + + - name: Create pull request + uses: peter-evans/create-pull-request@v8 + with: + token: ${{ secrets.MONTHLY_UPDATE_TOKEN }} + commit-message: "chore: update dependencies" + title: "chore: update dependencies" + body: | + Automated dependency refresh. + + - Pre-commit hooks updated via `pre-commit autoupdate` + - npm dependencies updated within the ranges in `package.json` + branch: chore/update-deps + delete-branch: true + labels: dependencies + signoff: true + add-paths: | + .pre-commit-config.yaml + package.json + package-lock.json