chore(deps): bump github.com/supabase/cli from 1.203.0 to 1.203.1 #188
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 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version-file: 'go.mod' | |
cache: true | |
- run: make generate-json | |
- run: | | |
if [[ `git status --porcelain` ]]; then | |
echo "[bot] Schema changes detected, committing." | |
# git sha != sha1: https://git-scm.com/book/en/v2/Git-Internals-Git-Objects | |
sha=$(gh api -X GET repos/{owner}/{repo}/contents/$SCHEMA_FILE -F ref='${{ github.head_ref }}' --jq '.sha') | |
b64=$(cat $SCHEMA_FILE | base64) | |
gh api -X PUT repos/{owner}/{repo}/contents/$SCHEMA_FILE -F branch='${{ github.head_ref }}' \ | |
-F content="$b64" -F sha="$sha" -F message='docs: update json schema file' | |
else | |
echo "[bot] No schema changes detected, nothing to commit." | |
fi | |
env: | |
SCHEMA_FILE: docs/schema.json | |
GH_TOKEN: ${{ github.token }} |