Update dependencies and create a PR #579
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 dependencies and create a PR" | |
on: | |
workflow_dispatch: {} | |
schedule: | |
- cron: "0 0 */1 * *" | |
jobs: | |
update: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
pull-requests: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: cachix/install-nix-action@v20 | |
- name: Update flake.lock | |
run: | | |
nix flake update nixpkgs | |
nix flake update home-manager | |
nix flake update nix-index-database | |
nix flake update impermanence | |
nix flake update agenix | |
nix flake update neovim-nightly-overlay | |
nix flake update nvim-blink-cmp | |
nix flake update niri | |
- name: Create PR | |
uses: peter-evans/create-pull-request@v5 | |
id: create-pr | |
with: | |
title: Update flake.lock | |
add-paths: flake.lock | |
commit-message: "chore: update flake.lock" | |
body: | | |
Automatically created by [this](https://github.com/debugloop/dotfiles/actions/runs/${{ github.run_id }}) run. | |
delete-branch: true | |
draft: false | |
- name: Set auto merge | |
run: gh pr merge --auto --rebase --delete-branch ${{ steps.create-pr.outputs.pull-request-number }} | |
if: ${{ steps.create-pr.outputs.pull-request-head-sha }} | |
env: | |
GH_TOKEN: ${{ github.token }} |