Add Github workflow for automatic flake updates

This commit is contained in:
Archit Gupta 2023-12-05 21:31:03 -08:00
parent 8f3bfc39aa
commit dcb12b6a22
2 changed files with 26 additions and 1 deletions

View File

@ -9,7 +9,7 @@ trim_trailing_whitespace = true
insert_final_newline = true insert_final_newline = true
max_line_length = 80 max_line_length = 80
[{*.nix,flake.lock}] [{*.nix,flake.lock,*.yml}]
indent_size = 2 indent_size = 2
[*.md] [*.md]

25
.github/workflows/update.yml vendored Normal file
View File

@ -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