Compare commits

...

4 commits

Author SHA1 Message Date
Ingolf Wagner da5af11569
nix flake check fixes
All checks were successful
Build all NixOS Configurations / nix build (push) Successful in 3m22s
2024-07-20 23:33:19 +02:00
Ingolf Wagner 399c99aa44
try to fix update routine
All checks were successful
Build all NixOS Configurations / nix build (push) Successful in 6m54s
2024-07-20 23:25:07 +02:00
Ingolf Wagner 34a42131b2
try to fix update routine
Some checks failed
Build all NixOS Configurations / nix build (push) Has been cancelled
2024-07-20 23:19:11 +02:00
Ingolf Wagner 87ab03b22e
reformat
All checks were successful
Build all NixOS Configurations / nix build (push) Successful in 6m54s
2024-07-20 23:09:29 +02:00
3 changed files with 34 additions and 9 deletions

View file

@ -26,7 +26,8 @@ jobs:
- run: nix flake archive
- run: nix flake check --verbose --log-format raw
- name: nix flake check
run: nix flake check --verbose --log-format raw
- name: teardown ssh
if: always()

View file

@ -2,32 +2,54 @@ name: Update Nix flakes and commit changes
on:
schedule:
- cron: "0 23 * * *"
- cron: "5/10 * * * *"
jobs:
update-and-commit:
runs-on: native
steps:
- name: Checkout repository
- name: checkout repository
uses: actions/checkout@v2
with:
ref: "update"
fetch-depth: 0
- name: Setup Git
- 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
- name: rebase with main branch
run: |
git fetch origin main
git rebase origin/main
- name: Update Nix flakes
- name: setup ssh
run: |
cat <<EOF > .id_rsa
${{ secrets.SSH_KEY }}
EOF
chmod 600 .id_rsa
eval $(ssh-agent)
ssh-add .id_rsa
cat <<EOF > "$GITHUB_ENV"
SSH_AUTH_SOCK="$SSH_AUTH_SOCK"
SSH_AGENT_PID=$SSH_AGENT_PID
EOF
- name: update nix flakes
run: nix flake update
- name: Commit and Push changes
- name: commit and push changes
run: |
git diff --quiet && git diff --staged --quiet || (git commit -am "Update Nix flakes" && git push)
git diff --quiet && \
git diff --staged --quiet || \
(git commit -am "Update Nix flakes" && git push)
- name: teardown ssh
if: always()
run: |
echo $SSH_AGENT_PID
kill $SSH_AGENT_PID

View file

@ -5,6 +5,8 @@
../../modules
];
system.stateVersion = "24.11";
components.mainUser.enable = true;
components.network.enable = true;