-
-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add action for updating schema visualizer in the website
- Loading branch information
1 parent
ecfe8d6
commit 2d2020f
Showing
2 changed files
with
16 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,9 +4,10 @@ on: | |
push: | ||
branches: | ||
- master | ||
- automate-spec-update-to-website | ||
paths: | ||
- schemas/3.0.0-without-$id.json # Monitor changes in this v3 file | ||
# Monitor changes in this v3 file | ||
- schemas/3.0.0-without-$id.json | ||
- schemas/3.0.0.json | ||
|
||
jobs: | ||
sync-schema: | ||
|
@@ -16,42 +17,33 @@ jobs: | |
- name: Checkout spec-json-schema repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Debug Token Presence | ||
run: | | ||
if [ -n "${{ secrets.GH_TOKEN }}" ]; then | ||
echo "Token is present" | ||
else | ||
echo "Token is empty" | ||
fi | ||
- name: Checkout website repo | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: acethecreator/website | ||
token: ${{ secrets.GH_TOKEN }} | ||
repository: asyncapi/website | ||
token: ${{ secrets.GH_TOKEN || secrets.GITHUB_TOKEN }} | ||
path: ./website | ||
|
||
- name: Copy Schema File | ||
- name: Copy version 3 Schema File | ||
run: | | ||
cp -r 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 }} | ||
token: ${{ secrets.GH_TOKEN || secrets.GITHUB_TOKEN }} | ||
path: website | ||
commit-message: "chore: sync latest schema updates" | ||
commit-message: "chore: sync latest spec json schema updates" | ||
committer: asyncapi-bot <[email protected]> | ||
author: asyncapi-bot <[email protected]> | ||
title: "chore: sync latest schema update" | ||
title: "chore: sync latest spec-json-schema update" | ||
body: | | ||
Automated PR to sync latest schema update from spec-json-schema repository. | ||
Automated Pull Request to sync latest schema update from spec-json-schema repository. | ||
Updates to: `3.0.0-without-$id.json` | ||
Triggered by commit: ${{ github.sha }} | ||
branch: update-schema | ||
Updates to: `config/3.0.0-without-$id.json` | ||
branch: update-schema/${{ github.sha }} | ||
labels: | | ||
automated | ||
schema-sync | ||
spec-json-schema-sync | ||
base: master | ||
delete-branch: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters