Skip to content

Commit 9f3e144

Browse files
committed
(Fixed) Workflows Update
1 parent e78ae9f commit 9f3e144

File tree

4 files changed

+56
-41
lines changed

4 files changed

+56
-41
lines changed

.github/dependabot.yml

Lines changed: 0 additions & 8 deletions
This file was deleted.

.github/workflows/deps-update.yml

Lines changed: 0 additions & 33 deletions
This file was deleted.

.github/workflows/update-npm.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Update Npm Dependencies
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
schedule:
9+
- cron: '0 0 * * 1'
10+
11+
permissions:
12+
contents: write
13+
pull-requests: write
14+
15+
jobs:
16+
npm-update:
17+
env:
18+
pr_title: '[Automated] Update NPM dependencies'
19+
20+
runs-on: ubuntu-latest
21+
22+
steps:
23+
- name: Check out repository
24+
uses: actions/checkout@v4
25+
26+
- name: Set up Node.js
27+
uses: actions/setup-node@v4
28+
with:
29+
node-version-file: '.node-version'
30+
cache: 'npm'
31+
32+
- name: Install dependencies
33+
run: npm ci
34+
35+
- name: Update packages
36+
run: npm update
37+
38+
- name: Check for changes
39+
id: git-check
40+
run: |
41+
git diff --exit-code || echo "changes=true" >> $GITHUB_OUTPUT
42+
43+
- name: Create Pull Request
44+
if: ${{ steps.git-check.outputs.changes == 'true' }}
45+
uses: peter-evans/create-pull-request@v5
46+
with:
47+
token: ${{ secrets.BOT_TOKEN }}
48+
base: main
49+
add-paths: |
50+
package-lock.json
51+
commit-message: 'chore: update npm dependencies'
52+
title: ${{ env.pr_title }}
53+
body: 'Automated changes by GitHub Actions'
54+
branch: automated-npm-update
55+
delete-branch: true

.node-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
22.12.0

0 commit comments

Comments
 (0)