Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: add action to sync v3 spec-json-schema updates with website #562

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
49 changes: 49 additions & 0 deletions .github/workflows/copy-updated-schema.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Sync Schema Update to Website

on:
push:
branches:
- master
paths:
# Monitor changes in this v3 file
- schemas/3.0.0-without-$id.json
- schemas/3.0.0.json

jobs:
sync-schema:
runs-on: ubuntu-latest
environment: GH_TOKEN
steps:
- name: Checkout spec-json-schema repo
uses: actions/checkout@v3

- name: Checkout website repo
uses: actions/checkout@v3
with:
repository: asyncapi/website
token: ${{ secrets.GH_TOKEN || secrets.GITHUB_TOKEN }}
path: ./website

- name: Copy version 3 Schema File
run: |
cp schemas/3.0.0-without-\$id.json website/config

- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GH_TOKEN || secrets.GITHUB_TOKEN }}
path: website
commit-message: "chore: sync latest spec json schema updates"
committer: asyncapi-bot <[email protected]>
author: asyncapi-bot <[email protected]>
title: "chore: sync latest spec-json-schema update"
body: |
Automated Pull Request to sync latest schema update from spec-json-schema repository.

Updates to: `config/3.0.0-without-$id.json`
branch: update-schema/${{ github.sha }}
labels: |
automated
spec-json-schema-sync
base: master
delete-branch: true