-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (41 loc) · 1.2 KB
/
update-dx.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Update Packages DX
on:
schedule:
- cron: "0 0 * * 0" # This will run the action every Sunday at midnight
workflow_dispatch:
pull_request:
branches:
- main
jobs:
update-packages:
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: main
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: "18"
- name: Check for outdated packages @new-objects/*
run: |
npx npm-check-updates "/@new-objects/" -u
npm install
- name: Commit changes
run: |
git config user.name "GitHub Action"
git config user.email "[email protected]"
git add package.json package-lock.json
if git diff --staged --quiet; then
echo "No changes to commit"
exit 0
else
git commit -m "Update outdated packages"
fi
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GH_TOKEN }}
title: "Update outdated packages"
body: "This PR updates outdated packages of @new-objects/*."