nvim-treesitter/.github/workflows/update-parsers-pr.yml
Github Actions d8f75f0b09 [docgen] Update README.md
skip-checks: true
2020-12-12 19:04:43 +01:00

44 lines
1.4 KiB
YAML

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: tsx,typescript,javascript # HACK: remove as soon tsx,typescript get updated
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: 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 }}