Skip to content

Update Neovim Plugins #31

Update Neovim Plugins

Update Neovim Plugins #31

Workflow file for this run

name: Update Neovim Plugins
on:
schedule:
# Run Daily
- cron: "0 23 * * *"
workflow_dispatch:
jobs:
update:
name: Lazy update
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: Homebrew/actions/setup-homebrew@master
- name: Install Neovim
run: |
brew install nvim
- name: Symlink dotfiles
run: |
BASE_PATH="$(git rev-parse --show-toplevel)"
ln -s "$BASE_PATH/.config/nvim" "$HOME/.config/nvim"
- name: Run Updates
id: update
run: |
nvim --version
nvim --headless "+Lazy! update" +qa!
echo "updated_plugins<<EOF" >> $GITHUB_OUTPUT
git diff | awk 'NR>6 && /^\+/ { print $2 }' | cut -d'"' -f2 | sed 's/^/- /' >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
base: main
branch: lazy-update
commit-message: Update lazy-lock
title: Update lazy-lock
body: |
Updated plugins:
${{ steps.update.outputs.updated_plugins }}