Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update Neovim Plugins | |
on: push | |
# 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! | |
updated_plugins="$(git diff | awk 'NR>6 && /^\+/ { print $2 }' | cut -d'"' -f2 | sed 's/^/- /')" | |
echo "updated_plugins<<EOF" >> $GITHUB_OUTPUT | |
echo $updated_plugins >> $GITHUB_OUTPUT | |
echo "EOF" >> $GITHUB_OUTPUT | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v6 | |
with: | |
commit-message: Update lazy-lock | |
title: Update lazy-lock | |
body: | | |
## Updates lazy-lock (nvim plugins) | |
### Updated plugins: | |
${{ steps.update.outputs.updated_plugins }} | |
Auto-generated by [create-pull-request][1] | |
[1]: https://github.com/peter-evans/create-pull-request | |
branch: lazy-update |