update lock and add auto update lock

This commit is contained in:
2026-07-29 17:41:43 +08:00
parent 0bdaaa0c31
commit 72d09590e9
2 changed files with 47 additions and 6 deletions
+41
View File
@@ -0,0 +1,41 @@
name: Update flake lock
on:
schedule:
- cron: "0 0 * * 1"
workflow_dispatch:
permissions:
contents: write
concurrency:
group: update-flake-lock
cancel-in-progress: false
jobs:
update:
runs-on: ubuntu-24.04
steps:
- name: Check out source
uses: actions/checkout@v6
- name: Install Nix
uses: cachix/install-nix-action@v31
with:
github_access_token: ${{ github.token }}
- name: Update lock file
run: nix flake update
- name: Commit and push changes
run: |
set -euo pipefail
if git diff --quiet -- flake.lock; then
exit 0
fi
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add flake.lock
git commit -m "flake: update lock file"
git push