-
Notifications
You must be signed in to change notification settings - Fork 4
50 lines (42 loc) · 1.28 KB
/
update-codejson-schema.yml
File metadata and controls
50 lines (42 loc) · 1.28 KB
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
49
50
name: Update CodeJSON Schema
on:
workflow_dispatch:
schedule:
- cron: "0 0 1 * *"
jobs:
update-schema:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"
- name: Install dependencies
run: npm install
- name: Generate schema
run: npm run generate-schema
- name: Check for changes
id: changes
run: |
if git diff --quiet; then
echo "changed=false" >> $GITHUB_OUTPUT
else
echo "changed=true" >> $GITHUB_OUTPUT
fi
- name: Create Pull Request
if: steps.changes.outputs.changed == 'true'
uses: peter-evans/create-pull-request@v6
with:
commit-message: "chore: update code.json schema"
title: "chore: update code.json schema"
body: |
- This PR was automatically generated because a new schema version was detected.
- Please review the changes to `src/types/CodeJSONSchema.ts` before merging.
branch: automated/update-schema
delete-branch: true