forked from nvim-treesitter/nvim-treesitter
-
Notifications
You must be signed in to change notification settings - Fork 1
52 lines (46 loc) · 1.58 KB
/
update-parsers-pr.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
49
50
51
52
name: Make Parser Update PR
on:
push:
branches:
- master
jobs:
update-parsers:
name: Update parsers
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: master
- name: Prepare
run: |
sudo apt-get update
sudo add-apt-repository universe
wget https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64
mv ./jq-linux64 /tmp/jq
chmod +x /tmp/jq
wget https://github.com/neovim/neovim/releases/download/nightly/nvim.appimage
chmod u+x nvim.appimage
mkdir -p ~/.local/share/nvim/site/pack/nvim-treesitter/start
ln -s $(pwd) ~/.local/share/nvim/site/pack/nvim-treesitter/start
- name: Update parsers
env:
SKIP_LOCKFILE_UPDATE_FOR_LANGS: verilog
run: |
./nvim.appimage --headless -c "luafile ./scripts/write-lockfile.lua" -c "q"
# Pretty print
cp lockfile.json /tmp/lockfile.json
cat /tmp/lockfile.json | /tmp/jq --sort-keys > lockfile.json
- name: Commit changes
run: |
git config user.name "GitHub"
git config user.email "[email protected]"
git add lockfile.json
git commit -m "Update lockfile.json" || echo 'No commit necessary!'
git clean -xf
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
commit-message: Update lockfile.json
title: Update lockfile.json
branch: update-lockfile-pr
base: ${{ github.head_ref }}