mirror of
https://github.com/chenasraf/nvim-treesitter.git
synced 2026-05-17 17:38:02 +00:00
Problem: Tracking parser revision in lockfile and allowing override through the parsers module complicates the code. In addition, only revision changes are handled robustly, not changes to other installation info. Solution: Track parser revision in the parsers module directly. Reload parser table on every install or update call. Support modifying parser table in a `User TSUpdate` autocommand.
48 lines
1.2 KiB
YAML
48 lines
1.2 KiB
YAML
name: Update README
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
update-readme:
|
|
name: Update README
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/create-github-app-token@v2
|
|
id: app-token
|
|
with:
|
|
app-id: ${{ vars.TOKEN_ID }}
|
|
private-key: ${{ secrets.TOKEN_PRIVATE_KEY }}
|
|
|
|
- name: Prepare
|
|
env:
|
|
NVIM_TAG: nightly
|
|
run: |
|
|
bash ./scripts/ci-install.sh
|
|
|
|
- name: Check README
|
|
run: |
|
|
nvim -l scripts/update-readme.lua || echo 'Needs update'
|
|
|
|
- name: Create Pull Request
|
|
uses: peter-evans/create-pull-request@v7
|
|
with:
|
|
add-paths: SUPPORTED_LANGUAGES.md
|
|
token: ${{ steps.app-token.outputs.token }}
|
|
sign-commits: true
|
|
commit-message: "bot(readme): update"
|
|
title: Update SUPPORTED_LANGUAGES.md
|
|
body: "[beep boop](https://github.com/peter-evans/create-pull-request)"
|
|
branch: update-readme-pr
|
|
base: ${{ github.head_ref }}
|
|
|
|
- name: Enable Pull Request Automerge
|
|
env:
|
|
GH_TOKEN: ${{ steps.app-token.outputs.token }}
|
|
run: gh pr merge --rebase --auto update-readme-pr
|