From 61762eb22dd954313c69e6ff001931e587d498ac Mon Sep 17 00:00:00 2001 From: Ingolf Wagner Date: Sun, 21 Jul 2024 12:33:53 +0200 Subject: [PATCH] try how it kinda should work --- .forgejo/workflows/nix_build.yaml | 45 +++++++++++++++---------------- 1 file changed, 21 insertions(+), 24 deletions(-) diff --git a/.forgejo/workflows/nix_build.yaml b/.forgejo/workflows/nix_build.yaml index 6a1b900..f2b7e6a 100644 --- a/.forgejo/workflows/nix_build.yaml +++ b/.forgejo/workflows/nix_build.yaml @@ -31,7 +31,7 @@ jobs: rm .ssh_key - - name: nix flake archive + - name: nix flake archive/check run: | cat < .id_rsa ${{ secrets.SSH_KEY }} @@ -41,12 +41,8 @@ jobs: eval $(ssh-agent) ssh-add .id_rsa - cat < "$GITHUB_ENV" - SSH_AUTH_SOCK="$SSH_AUTH_SOCK" - SSH_AGENT_PID=$SSH_AGENT_PID - EOF - nix flake archive + nix flake check --verbose --log-format raw echo $SSH_AGENT_PID kill $SSH_AGENT_PID @@ -55,17 +51,28 @@ jobs: - name: nix flake check run: nix flake check --verbose --log-format raw - #- name: nix build orbi - # run: nix build .#nixosConfigurations.orbi.config.system.build.toplevel + - 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 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 cherry + run: nix build .#nixosConfigurations.cherry.config.system.build.toplevel - #- name: nix build chungus - # run: nix build .#nixosConfigurations.chungus.config.system.build.toplevel + - name: nix build chungus + run: nix build .#nixosConfigurations.chungus.config.system.build.toplevel + + - name: push if all fine + if: ${{ github.event_name == 'schedule' }} + run: | + + git config --local user.email "action@git.ingolf-wagner.de" + git config --local user.name "Forgejo Action" + + git diff --quiet && \ + git diff --staged --quiet || \ + (git commit -am "Update Nix flakes" && git push) #name: Build all NixOS Configurations @@ -131,14 +138,4 @@ jobs: # - name: nix build chungus # run: nix build .#nixosConfigurations.chungus.config.system.build.toplevel -# - name: push if all fine (branch update) -# #if: github.event_name == 'schedule' -# run: | -# -# git config --local user.email "action@git.ingolf-wagner.de" -# git config --local user.name "Forgejo Action" -# -# git diff --quiet && \ -# git diff --staged --quiet || \ -# (git commit -am "Update Nix flakes" && git push)