-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Co-authored-by: Sion Kang <[email protected]>
- Loading branch information
1 parent
84075e5
commit faac53e
Showing
8 changed files
with
8,430 additions
and
40 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
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: | |
pull_request: | ||
paths: | ||
- 'src/ai/backend/manager/models/**' | ||
- 'src/ai/backend/manager/api/**' | ||
|
||
jobs: | ||
graphql-updated: | ||
api-updated: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
|
@@ -52,27 +53,28 @@ jobs: | |
cache-lmdb-store: 'true' | ||
- name: Pants export | ||
run: pants export --resolve=python-default | ||
- name: Create GraphQL schema dump | ||
- name: Create api schema dump | ||
run: | | ||
./backend.ai mgr api dump-gql-schema --output src/ai/backend/manager/api/schema.graphql | ||
- name: Extract the author information | ||
id: get_author_info | ||
./backend.ai mgr api dump-gql-schema --output docs/manager/graphql-reference/schema.graphql | ||
./backend.ai mgr api dump-openapi --output docs/manager/rest-reference/openapi.json | ||
- name: Make commit message for changing change log file | ||
run: | | ||
git add docs/manager/graphql-reference/schema.graphql | ||
git add docs/manager/rest-reference/openapi.json | ||
author_name=$(git show -q --pretty='format:%an') | ||
author_email=$(git show -q --pretty='format:%ae') | ||
git config user.email "$author_email" | ||
git config user.name "$author_name" | ||
if [ -n "$(git diff --staged)" ]; then | ||
git commit \ | ||
-m "chore: update GraphQL schema dump" \ | ||
-m "chore: update api schema dump" \ | ||
--author="$author_name <$author_email>" \ | ||
--trailer "Co-authored-by: octodog <[email protected]>" | ||
git push | ||
fi | ||
graphql-inspector: | ||
needs: graphql-updated | ||
name: Check Schema | ||
needs: api-updated | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
|
@@ -82,6 +84,6 @@ jobs: | |
- uses: actions/checkout@v4 | ||
- uses: kamilkisiela/graphql-inspector@release-1717403590269 | ||
with: | ||
schema: '${{ github.base_ref }}:src/ai/backend/manager/api/schema.graphql' | ||
schema: '${{ github.base_ref }}:docs/manager/graphql-reference/schema.graphql' | ||
rules: | | ||
gql-inspector-checker.js |
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
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
File renamed without changes.
Oops, something went wrong.