From 12c61faa0673d700ccefebea3b700775480d74bd Mon Sep 17 00:00:00 2001 From: Majo Richter <39386799+NobleMajo@users.noreply.github.com> Date: Tue, 3 Dec 2024 16:54:59 +0100 Subject: [PATCH] Create auto-update.yml --- .github/workflows/auto-update.yml | 38 +++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/auto-update.yml diff --git a/.github/workflows/auto-update.yml b/.github/workflows/auto-update.yml new file mode 100644 index 0000000..50b70a1 --- /dev/null +++ b/.github/workflows/auto-update.yml @@ -0,0 +1,38 @@ +name: Update npm dependencies + +on: + schedule: + - cron: '30 12 7,21 * *' + workflow_dispatch: + +jobs: + update-dependencies: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: 20 + cache: 'npm' + + - name: Update npm dependencies + run: | + npm version patch --no-git-tag-version + npm update + npm run build + npm run test --if-present + + - name: Commit and push changes + uses: EndBug/add-and-commit@v9 + with: + add: 'package*.json' + author_name: 'github-actions[bot]' + author_email: 'github-actions[bot]@users.noreply.github.com' + fetch: false + message: 'Npm deps update' + pathspec_error_handling: exitImmediately + pull: '--rebase --autostash'