-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add ci for generating + publishing schema.json (#23)
* chore: add ci for generating + publishing schema.json * chore(schema): generate --------- Co-authored-by: github-actions <[email protected]>
- Loading branch information
1 parent
c7ce976
commit 4507ebe
Showing
3 changed files
with
84 additions
and
64 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 |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: "Generate Schema" | ||
|
||
on: | ||
pull_request: | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
env: | ||
DENO_DIR: ~/.deno-cache | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
deno-version: [1.41.3] | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event.pull_request.head.ref }} | ||
|
||
- name: Setup Deno ${{ matrix.deno-version }} | ||
uses: denoland/setup-deno@v1 | ||
with: | ||
deno-version: ${{ matrix.deno-version }} | ||
- name: Run generate-schema | ||
run: deno task generate-schema | ||
- name: Commit and push to pr | ||
run: | | ||
diff=$(git diff schema.json) | ||
if [[ "${diff}" ]]; then | ||
git config user.name github-actions | ||
git config user.email [email protected] | ||
git add schema.json | ||
git commit -m 'chore(schema): generate' | ||
git push | ||
exit 0 | ||
fi | ||
echo "skipping" |
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