From dcb12b6a22f8afd9d5a35601c8b8aa97ccb86875 Mon Sep 17 00:00:00 2001 From: Archit Gupta Date: Tue, 5 Dec 2023 21:31:03 -0800 Subject: [PATCH] Add Github workflow for automatic flake updates --- .editorconfig | 2 +- .github/workflows/update.yml | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/update.yml diff --git a/.editorconfig b/.editorconfig index 2ad9a8b..5ce7cda 100644 --- a/.editorconfig +++ b/.editorconfig @@ -9,7 +9,7 @@ trim_trailing_whitespace = true insert_final_newline = true max_line_length = 80 -[{*.nix,flake.lock}] +[{*.nix,flake.lock,*.yml}] indent_size = 2 [*.md] diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml new file mode 100644 index 0000000..010611c --- /dev/null +++ b/.github/workflows/update.yml @@ -0,0 +1,25 @@ +name: Update flake inputs + +on: + schedule: + - cron: "0 12 ? * MON" + workflow_dispatch: + +permissions: + contents: write + +jobs: + update-inputs: + name: Update inputs + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: cachix/install-nix-action@master + - name: Configure git + run: | + git config user.name "github-actions[bot]" + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + - run: nix flake update --commit-lock-file + - run: nix flake check --all-systems + - run: nix eval .#tests + - run: git push