nixos-config/.forgejo/workflows/update_nix_flakes.yml

34 lines
786 B
YAML
Raw Normal View History

2024-07-20 22:32:37 +02:00
name: Update Nix flakes and commit changes
on:
schedule:
- cron: "0 23 * * *"
jobs:
update-and-commit:
runs-on: native
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
ref: "update"
fetch-depth: 0
- name: Setup Git
run: |
git config --local user.email "action@git.ingolf-wagner.de"
git config --local user.name "Forgejo Action"
- name: Rebase with main branch
run: |
git fetch origin main
git rebase origin/main
- name: Update Nix flakes
run: nix flake update
- name: Commit and Push changes
run: |
git diff --quiet && git diff --staged --quiet || (git commit -am "Update Nix flakes" && git push)