ci: generate parser map #1
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
--- | |
name: Update filetype -> parser mappings | |
# Prevent concurrent auto-commits | |
concurrency: | |
group: update-filetype-parser-mappings | |
cancel-in-progress: true | |
on: | |
push: | |
branches: | |
- 'main' | |
paths: | |
- '.github/scripts/echo-nvim-ts-ft-maps.lua' | |
- .github/workflows/update-ft-ts-maps.yml | |
schedule: | |
# Runs at midnight | |
- cron: "0 0 * * *" | |
workflow_dispatch: | |
jobs: | |
update-filetype-parser-mappings: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.ref }} | |
- uses: actions/checkout@v4 | |
with: | |
repository: nvim-treesitter/nvim-treesitter | |
path: nvim-treesitter | |
ref: main | |
- uses: rhysd/action-setup-vim@v1 | |
with: | |
neovim: true | |
version: nightly | |
- name: Update tree-sitter parsers JSON | |
run: | | |
./.github/scripts/echo-nvim-ts-ft-maps.lua > lua/rocks_treesitter/ft_parser_map.lua | |
- name: commit | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
commit_message: "chore: update filetype -> parser map" | |
file_pattern: "lua/rocks_treesitter/ft_parser_map.lua" |