aboutsummaryrefslogtreecommitdiffstats
path: root/.github/workflows/update-lockfile.yml
diff options
context:
space:
mode:
authorDundar Göc <gocdundar@gmail.com>2022-02-06 10:57:47 +0100
committerKiyan <yazdani.kiyan@protonmail.com>2022-02-14 19:15:17 +0100
commitf476df31af4d6d4bbb6a34b3ca870564cfc39b83 (patch)
tree4fe40beb63643a9fefe7a33769449d981932ff50 /.github/workflows/update-lockfile.yml
parentUpdate lockfile.json (#2529) (diff)
downloadnvim-treesitter-f476df31af4d6d4bbb6a34b3ca870564cfc39b83.tar
nvim-treesitter-f476df31af4d6d4bbb6a34b3ca870564cfc39b83.tar.gz
nvim-treesitter-f476df31af4d6d4bbb6a34b3ca870564cfc39b83.tar.bz2
nvim-treesitter-f476df31af4d6d4bbb6a34b3ca870564cfc39b83.tar.lz
nvim-treesitter-f476df31af4d6d4bbb6a34b3ca870564cfc39b83.tar.xz
nvim-treesitter-f476df31af4d6d4bbb6a34b3ca870564cfc39b83.tar.zst
nvim-treesitter-f476df31af4d6d4bbb6a34b3ca870564cfc39b83.zip
ci: rename workflows and jobs to be more consistent
Diffstat (limited to '.github/workflows/update-lockfile.yml')
-rw-r--r--.github/workflows/update-lockfile.yml55
1 files changed, 55 insertions, 0 deletions
diff --git a/.github/workflows/update-lockfile.yml b/.github/workflows/update-lockfile.yml
new file mode 100644
index 000000000..b712af417
--- /dev/null
+++ b/.github/workflows/update-lockfile.yml
@@ -0,0 +1,55 @@
+name: Update lockfile
+
+on:
+ schedule:
+ - cron: '30 6 * * *'
+ push:
+ branches:
+ - master
+
+jobs:
+ update-lockfile:
+ name: Update lockfile
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ with:
+ ref: master
+
+ - name: Prepare
+ env:
+ NVIM_TAG: stable
+ run: |
+ 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/${NVIM_TAG}/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 "noreply@github.com"
+ 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 }}
+ draft: true