Compare commits

..

16 Commits

Author SHA1 Message Date
3263a37074 workflow: push right after rebasing
Some checks failed
Update Nix Flake / update-flake (push) Failing after 17s
2025-03-23 18:57:16 +01:00
fc412f2596 workflow: use rebase instead of merge 2025-03-23 18:51:49 +01:00
c9862e6efc workflow: change cron time
Some checks failed
Update Nix Flake / update-flake (push) Failing after 6s
2025-03-22 10:51:21 +01:00
ed52562b55 workflow: use git diff --cached 2025-03-22 10:51:13 +01:00
8d9892e958 workflow: Simplify automatic merge conflict solving 2025-03-22 09:03:05 +01:00
489b839452 Workflow: automatically solve merge conflict 2025-03-22 08:58:58 +01:00
3801bbda11 remove unnecessary git push 2025-03-22 08:46:34 +01:00
a2a3d2586c workflow: fix merge conflict failing script 2025-03-22 08:44:58 +01:00
2ac3af7a53 workflow: first check if merge is necessary 2025-03-22 08:42:55 +01:00
b0b6ef6bba workflow: use merge instead of rebase 2025-03-22 08:34:16 +01:00
595a9761d0 workflow: use --force-with-lease instead of -f 2025-03-22 08:05:24 +01:00
9fa984aa14 workflow: use force pushing 2025-03-22 07:40:30 +01:00
4cce287379 workflow: rebase instead of reset to fix git push 2025-03-22 07:34:19 +01:00
239eaa7dd6 Workflow: refer to main instead of master
Some checks failed
Update Nix Flake / update-flake (push) Failing after 13s
2025-03-21 22:37:56 +01:00
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 58 additions and 1 deletions

View File

@@ -0,0 +1,57 @@
name: Update Nix Flake
on:
schedule:
- cron: "45 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: Git config
shell: bash
run: |
git config user.name "Gitea Actions"
git config user.email "actions@gitea.local"
- name: Rebase from main branch
shell: bash
run: |
commits_ahead=$(git rev-list --count HEAD..origin/main)
echo "Commits ahead: $commits_ahead"
git log --oneline -5
echo "----------"
git log --oneline -5 origin/main
echo .
if [ $commits_ahead -ne 0 ]
then
git rebase -X theirs origin/main
git push --force-with-lease origin flake-updates
else
echo "Rebase not necessary"
fi
- 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 add flake.lock
git status
git diff --cached --quiet && echo "No changes to commit." && exit 0
git commit -m "Update flake.lock $(date -I)"
git push --force-with-lease origin flake-updates

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";