Add flake update workflow

This commit is contained in:
2025-12-28 00:18:49 -05:00
parent 42e54c4631
commit b2f84568e8

View File

@@ -0,0 +1,45 @@
name: Update nix flake inputs
on:
schedule:
# Every Sunday at 03:00 UTC
- cron: "0 3 * * 0"
jobs:
flake-update:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Git Config
run: |
git config user.name "gitea-actions"
git config user.email "actions@${GITEA_SERVER_HOST:-gitea.local}"
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v12
with:
nix_path: nixpkgs=channel:nixos-unstable
extra_conf: |
experimental-features = nix-command flakes
- name: Update flake.lock
run: nix flake update
- name: Commit flake.lock
run: |
if git diff --quiet flake.lock; then
echo "No changes to flake.lock"
exit 0
fi
git add flake.lock
git commit -m "Update flake inputs"
git push