update workflows
This commit is contained in:
parent
0aad87d144
commit
2b0fc96fba
2 changed files with 59 additions and 7 deletions
|
@ -1,6 +1,10 @@
|
||||||
on: [push]
|
name: Build all NixOS Configurations
|
||||||
|
|
||||||
|
on:
|
||||||
|
- push
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
nix build:
|
||||||
runs-on: native
|
runs-on: native
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
@ -20,15 +24,30 @@ jobs:
|
||||||
SSH_AGENT_PID=$SSH_AGENT_PID
|
SSH_AGENT_PID=$SSH_AGENT_PID
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
- run: nix flake archive
|
||||||
|
|
||||||
- run: nix flake check
|
- run: nix flake check
|
||||||
# - run: nix flake update
|
|
||||||
- run: nix build .#nixosConfigurations.orbi.config.system.build.toplevel
|
|
||||||
- run: nix build .#nixosConfigurations.cream.config.system.build.toplevel
|
|
||||||
- run: nix build .#nixosConfigurations.cherry.config.system.build.toplevel
|
|
||||||
- run: nix build .#nixosConfigurations.chungus.config.system.build.toplevel
|
|
||||||
|
|
||||||
- name: teardown ssh
|
- name: teardown ssh
|
||||||
if: always()
|
if: always()
|
||||||
run: |
|
run: |
|
||||||
echo $SSH_AGENT_PID
|
echo $SSH_AGENT_PID
|
||||||
kill $SSH_AGENT_PID
|
kill $SSH_AGENT_PID
|
||||||
|
|
||||||
|
- name: nix build orbi
|
||||||
|
run: nix build .#nixosConfigurations.orbi.config.system.build.toplevel
|
||||||
|
|
||||||
|
- name: nix build cream
|
||||||
|
run: nix build .#nixosConfigurations.cream.config.system.build.toplevel
|
||||||
|
|
||||||
|
- name: nix build cherry
|
||||||
|
run: nix build .#nixosConfigurations.cherry.config.system.build.toplevel
|
||||||
|
|
||||||
|
- name: nix build chungus
|
||||||
|
run: nix build .#nixosConfigurations.chungus.config.system.build.toplevel
|
||||||
|
|
||||||
|
#- name: teardown ssh
|
||||||
|
# if: always()
|
||||||
|
# run: |
|
||||||
|
# echo $SSH_AGENT_PID
|
||||||
|
# kill $SSH_AGENT_PID
|
||||||
|
|
33
.forgejo/workflows/update_nix_flakes.yml
Normal file
33
.forgejo/workflows/update_nix_flakes.yml
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
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)
|
Loading…
Reference in a new issue