Sync queries from monorepo #617
This file contains hidden or 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
| name: Sync queries from monorepo | |
| on: | |
| schedule: | |
| - cron: '0 */6 * * *' | |
| workflow_dispatch: | |
| jobs: | |
| sync: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Fetch .scm queries from monorepo | |
| run: | | |
| mkdir -p queries/plank | |
| curl -fSL \ | |
| "https://raw.githubusercontent.com/plankevm/plank-monorepo/main/plank-tree-sitter/queries/highlights.scm" \ | |
| -o queries/plank/highlights.scm | |
| curl -fSL \ | |
| "https://raw.githubusercontent.com/plankevm/plank-monorepo/main/plank-tree-sitter/queries/brackets.scm" \ | |
| -o queries/plank/brackets.scm | |
| curl -fSL \ | |
| "https://raw.githubusercontent.com/plankevm/plank-monorepo/main/plank-tree-sitter/queries/indents.scm" \ | |
| -o queries/plank/indents.scm | |
| - name: Commit if changed | |
| run: | | |
| git diff --quiet queries/ && echo "No changes" && exit 0 | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add queries/ | |
| git commit -m "sync: update .scm queries from monorepo" | |
| git push |