hydra-jobs/.gitea/workflows/update-flake.yaml
Julian Mutter 239eaa7dd6
Some checks failed
Update Nix Flake / update-flake (push) Failing after 13s
Workflow: refer to main instead of master
2025-03-21 22:37:56 +01:00

42 lines
1020 B
YAML

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 main
git reset --hard origin/main
- 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