From 586746a881b294ef1a194f6a408878b8e2647ad9 Mon Sep 17 00:00:00 2001 From: Danilo Reyes Date: Sun, 9 Nov 2025 10:30:03 -0600 Subject: [PATCH] push pipeline --- .gitea/workflows/build-on-push.yml | 54 ++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 .gitea/workflows/build-on-push.yml diff --git a/.gitea/workflows/build-on-push.yml b/.gitea/workflows/build-on-push.yml new file mode 100644 index 0000000..9a37da0 --- /dev/null +++ b/.gitea/workflows/build-on-push.yml @@ -0,0 +1,54 @@ +name: Build on Push + +on: + push: + branches: + - main + workflow_dispatch: # Allow manual trigger + +jobs: + build-configurations: + runs-on: nixos + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Configure Attic cache + run: | + # Configure attic client to use your cache server + attic login servidos http://127.0.0.1:2343 ${{ secrets.ATTIC_TOKEN }} + + - name: Build workstation configuration + run: | + echo "Building workstation configuration..." + nix build .#nixosConfigurations.workstation.config.system.build.toplevel --quiet + + - name: Build server configuration + run: | + echo "Building server configuration..." + nix build .#nixosConfigurations.server.config.system.build.toplevel --quiet + + - name: Build emacs-vm configuration + run: | + echo "Building emacs-vm configuration..." + nix build .#emacs-vm --quiet + + - name: Push to cache + run: | + echo "Pushing builds to cache..." + # Push all built derivations to cache + if ls result* 1> /dev/null 2>&1; then + attic push servidos:nixos result* + fi + + # Push the specific system derivations we just built + nix build .#nixosConfigurations.workstation.config.system.build.toplevel --print-out-paths | attic push servidos:nixos --stdin + nix build .#nixosConfigurations.server.config.system.build.toplevel --print-out-paths | attic push servidos:nixos --stdin + nix build .#emacs-vm --print-out-paths | attic push servidos:nixos --stdin + + - name: Summary + run: | + echo "✅ Build on push completed successfully!" + echo "- Built workstation, server, and emacs-vm configurations" + echo "- Pushed all builds to Atticd cache" +