Skip to content

Commit 34106e7

Browse files
ci: add action to sync v3 spec-json-schema updates with website (#575)
Co-authored-by: acethecreator <devaze007@gmail.com>
1 parent 8c4cb87 commit 34106e7

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Sync Schema Update to Website
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
paths:
9+
# Monitor changes in this v3 file
10+
- schemas/3.0.0-without-$id.json
11+
12+
jobs:
13+
sync-schema:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout spec-json-schema repo
17+
uses: actions/checkout@v3
18+
19+
- name: Checkout website repo
20+
uses: actions/checkout@v3
21+
with:
22+
repository: asyncapi/website
23+
token: ${{ secrets.GH_TOKEN || secrets.GITHUB_TOKEN }}
24+
path: ./website
25+
26+
- name: Copy version 3 Schema File
27+
run: |
28+
cp schemas/3.0.0-without-\$id.json website/config/3.0.0.json
29+
30+
- name: Create Pull Request
31+
uses: peter-evans/create-pull-request@4e1beaa7521e8b457b572c090b25bd3db56bf1c5 # use 5 https://github.com/peter-evans/create-pull-request/releases/tag/v5
32+
with:
33+
token: ${{ secrets.GH_TOKEN || secrets.GITHUB_TOKEN }}
34+
path: website
35+
commit-message: "chore: sync latest spec json schema updates"
36+
committer: asyncapi-bot <info@asyncapi.io>
37+
author: asyncapi-bot <info@asyncapi.io>
38+
title: "chore: sync latest spec-json-schema update"
39+
body: |
40+
Automated Pull Request to sync latest schema update from spec-json-schema repository.
41+
42+
Updates to: `config/3.0.0`
43+
branch: update-schema-${{ github.sha }}
44+
labels: |
45+
automated
46+
spec-json-schema-sync
47+
base: master
48+
delete-branch: true

0 commit comments

Comments
 (0)