Update flake input: srvos #1832
Workflow file for this run
This file contains hidden or 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 nvim plugins on nixpkgs update" | |
| on: | |
| pull_request: | |
| paths: | |
| - "flake.lock" | |
| jobs: | |
| update-vim-plugins: | |
| runs-on: ubuntu-slim | |
| if: github.event.pull_request.user.login == 'dotfiles-flake-updater[bot]' && (contains(github.event.pull_request.body, 'nixpkgs') || contains(github.event.pull_request.title, 'nixpkgs')) | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: true | |
| - uses: NixOS/nix-installer-action@main | |
| with: | |
| extra-conf: | | |
| extra-substituters = https://cache.thalheim.io | |
| extra-trusted-public-keys = cache.thalheim.io-1:R7msbosLEZKrxk/lKxf9BTjOOH7Ax3H0Qj0/6wiHOgc= | |
| - name: Update vim plugins | |
| run: | | |
| nix run .#nvim -- --headless "+Lazy! update" +qa | |
| cp "$HOME/.config/nvim-mic92/lazy-lock.json" home/.config/nvim/lazy-lock.json | |
| - name: Check for changes | |
| id: check-changes | |
| run: | | |
| if git diff --quiet home/.config/nvim/lazy-lock.json; then | |
| echo "has_changes=false" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "has_changes=true" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Commit vim plugin updates | |
| if: steps.check-changes.outputs.has_changes == 'true' | |
| run: | | |
| git config user.name "dotfiles-flake-updater[bot]" | |
| git config user.email "dotfiles-flake-updater[bot]@users.noreply.github.com" | |
| git add home/.config/nvim/lazy-lock.json | |
| git commit -m "Update vim plugins" | |
| git push origin HEAD |