-
Notifications
You must be signed in to change notification settings - Fork 4
48 lines (43 loc) · 1.19 KB
/
update-ft-ts-maps.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
---
name: Update filetype -> parser mappings
# Prevent concurrent auto-commits
concurrency:
group: update-filetype-parser-mappings
cancel-in-progress: true
permissions:
contents: write
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"