File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77 branches : [ "main" ]
88
99jobs :
10- build :
10+ validate :
1111 runs-on : ubuntu-latest
1212 steps :
1313 - uses : actions/checkout@v4
1717 node-version : 20.x
1818 - run : npm install -g ajv-cli ajv-formats
1919 - run : ajv compile --spec draft2020 -c ajv-formats -s schemas/**/schema.json
20+
21+ update-latest-schema :
22+ runs-on : ubuntu-latest
23+ needs : validate
24+ if : github.event_name == 'push'
25+ permissions :
26+ contents : write
27+ steps :
28+ - uses : actions/checkout@v4
29+ - name : Overwrite latest.json
30+ run : cp schemas/v1/schema.json schemas/latest.json
31+ - name : Commit schema changes (if any) to latest.json
32+ uses : stefanzweifel/git-auto-commit-action@v7
33+ id : auto-commit-action
34+ if : steps.auto-commit-action.outputs.changes_detected == 'true'
35+ with :
36+ commit_message : " Update latest.json from v1/schema.json"
37+ file_pattern : schemas/latest.json
You can’t perform that action at this time.
0 commit comments