mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-19 11:50:09 -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
|
wget https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64
|
||||||
mv ./jq-linux64 /tmp/jq
|
mv ./jq-linux64 /tmp/jq
|
||||||
chmod +x /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
|
sudo apt install libfuse2
|
||||||
wget https://github.com/neovim/neovim/releases/download/${NVIM_TAG}/nvim.appimage
|
wget https://github.com/neovim/neovim/releases/download/${NVIM_TAG}/nvim.appimage
|
||||||
chmod u+x nvim.appimage
|
chmod u+x nvim.appimage
|
||||||
|
|
@ -34,6 +37,7 @@ jobs:
|
||||||
env:
|
env:
|
||||||
SKIP_LOCKFILE_UPDATE_FOR_LANGS: verilog,gleam,nix
|
SKIP_LOCKFILE_UPDATE_FOR_LANGS: verilog,gleam,nix
|
||||||
run: |
|
run: |
|
||||||
|
cp lockfile.json /tmp/old_lockfile.json
|
||||||
./nvim.appimage --headless -c "luafile ./scripts/write-lockfile.lua" -c "q"
|
./nvim.appimage --headless -c "luafile ./scripts/write-lockfile.lua" -c "q"
|
||||||
# Pretty print
|
# Pretty print
|
||||||
cp lockfile.json /tmp/lockfile.json
|
cp lockfile.json /tmp/lockfile.json
|
||||||
|
|
@ -44,14 +48,15 @@ jobs:
|
||||||
git config user.name "GitHub"
|
git config user.name "GitHub"
|
||||||
git config user.email "noreply@github.com"
|
git config user.email "noreply@github.com"
|
||||||
git add lockfile.json
|
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
|
git clean -xf
|
||||||
|
|
||||||
- name: Create Pull Request
|
- name: Create Pull Request
|
||||||
uses: peter-evans/create-pull-request@v3
|
uses: peter-evans/create-pull-request@v3
|
||||||
with:
|
with:
|
||||||
commit-message: Update lockfile.json
|
title: "Update lockfile.json: ${{ env.UPDATED_PARSERS }}"
|
||||||
title: Update lockfile.json
|
|
||||||
branch: update-lockfile-pr
|
branch: update-lockfile-pr
|
||||||
base: ${{ github.head_ref }}
|
base: ${{ github.head_ref }}
|
||||||
draft: true
|
draft: true
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue