feat: support pooler data source #34
Workflow file for this run
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
# Regenerates JSON schema whenever a PR is merged to main | |
name: Generate JSON | |
on: | |
pull_request: | |
paths-ignore: | |
- 'README.md' | |
# Needs write permissions to write the schema to the repo | |
permissions: | |
contents: write | |
jobs: | |
schema: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: | | |
sha256sum docs/schema.json | |
sha1sum docs/schema.json | |
- uses: actions/setup-go@v5 | |
with: | |
go-version-file: 'go.mod' | |
cache: true | |
- run: go mod download | |
- run: make generate-json | |
- run: | | |
# git config --global user.name 'github-schema-bot' | |
# git config --global user.email 'github-schema-bot@supabase.com' | |
if [[ `git status --porcelain` ]]; then | |
echo "[bot] Schema changes detected, committing." | |
# git add docs/schema.json | |
# git commit -m "ci: regenerate json schema file" | |
# git push origin HEAD:${{ github.head_ref }} | |
sha=$(gh api repos/{owner}/{repo}/contents/$SCHEMA_FILE -F ref={branch} --jq '.sha') | |
echo "$sha" | |
b64=$(cat $SCHEMA_FILE | base64) | |
body='{"message":"docs: update json schema file","content":"$b64","sha":"$sha","branch":"${{ github.head_ref }}"}' | |
gh api repos/{owner}/{repo}/contents/$SCHEMA_FILE -F message='docs: update json schema file' \ | |
-F content=@$SCHEMA_FILE -F sha=$sha -F branch={branch} | |
else | |
echo "[bot] No schema changes detected, nothing to commit." | |
fi | |
env: | |
SCHEMA_FILE: docs/schema.json | |
GH_TOKEN: ${{ github.token }} |