Compare commits

...

2 Commits

Author SHA1 Message Date
9711e5c273 Use up-to-date dotfiles branch 2025-03-21 22:36:42 +01:00
87a3de6b98 Add gitea action to update flake daily 2025-03-21 22:36:31 +01:00
2 changed files with 42 additions and 1 deletions

View File

@ -0,0 +1,41 @@
name: Update Nix Flake
on:
schedule:
- cron: "30 0 * * *" # daily run
workflow_dispatch: {}
jobs:
update-flake:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
token: "${{ gitea.token }}"
fetch-depth: 0
ref: flake-updates
- name: Fetch latest changes and reset branch
run: |
git fetch origin master
git reset --hard origin/master
- name: Set up Nix
uses: cachix/install-nix-action@v31
- name: Update Flake
run: nix flake update
- name: Commit and push changes
shell: bash
run: |
git config user.name "Gitea Actions"
git config user.email "actions@gitea.local"
git add flake.lock
if git diff --cached --quiet; then
echo "No changes to commit."
else
git commit -m "Update flake.lock $(date -I)"
git push origin flake-updates
fi

View File

@ -2,7 +2,7 @@
description = "The collection of hydra jobs";
inputs = {
dotfiles.url = "git+https://gitlab.julian-mutter.de/julian/dotfiles";
dotfiles.url = "git+https://gitlab.julian-mutter.de/julian/dotfiles?ref=flake-updates";
# dotfiles.inputs.nixpkgs.follows = "nixpkgs";
# sheet-organizer.url = "git+https://gitlab.julian-mutter.de/julian/sheet-organizer";