Skip to content

Commit

Permalink
Create auto-update.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
NobleMajo authored Dec 3, 2024
1 parent 6440ada commit 12c61fa
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/auto-update.yml
Original file line number Diff line number Diff line change
@@ -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'

0 comments on commit 12c61fa

Please sign in to comment.