33 lines
786 B
YAML
33 lines
786 B
YAML
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)
|