mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
parent
c5d025c467
commit
818fb3b96b
1 changed files with 8 additions and 3 deletions
11
.github/workflows/update-lockfile.yml
vendored
11
.github/workflows/update-lockfile.yml
vendored
|
|
@ -24,6 +24,9 @@ jobs:
|
|||
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/josephburnett/jd/releases/download/v1.6.1/jd-amd64-linux
|
||||
mv ./jd-amd64-linux /tmp/jd
|
||||
chmod +x /tmp/jd
|
||||
sudo apt install libfuse2
|
||||
wget https://github.com/neovim/neovim/releases/download/${NVIM_TAG}/nvim.appimage
|
||||
chmod u+x nvim.appimage
|
||||
|
|
@ -34,6 +37,7 @@ jobs:
|
|||
env:
|
||||
SKIP_LOCKFILE_UPDATE_FOR_LANGS: verilog,gleam,nix
|
||||
run: |
|
||||
cp lockfile.json /tmp/old_lockfile.json
|
||||
./nvim.appimage --headless -c "luafile ./scripts/write-lockfile.lua" -c "q"
|
||||
# Pretty print
|
||||
cp lockfile.json /tmp/lockfile.json
|
||||
|
|
@ -44,14 +48,15 @@ jobs:
|
|||
git config user.name "GitHub"
|
||||
git config user.email "noreply@github.com"
|
||||
git add lockfile.json
|
||||
git commit -m "Update lockfile.json" || echo 'No commit necessary!'
|
||||
UPDATED_PARSERS=$(echo $(/tmp/jd -set /tmp/old_lockfile.json lockfile.json | grep @ | sed 's/","revision"\]//' | sed 's/@ \["//') | sed 's/ /, /g')
|
||||
echo "UPDATED_PARSERS=$UPDATED_PARSERS" >> $GITHUB_ENV
|
||||
git commit -m "Update parsers: $UPDATED_PARSERS" || 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
|
||||
title: "Update lockfile.json: ${{ env.UPDATED_PARSERS }}"
|
||||
branch: update-lockfile-pr
|
||||
base: ${{ github.head_ref }}
|
||||
draft: true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue