From c238a15f31113bdb4a1f0761b89ed1b3048e4232 Mon Sep 17 00:00:00 2001 From: Danilo Reyes Date: Thu, 2 Oct 2025 22:12:27 -0600 Subject: [PATCH] Update CI workflow to use NixOS, configure Attic cache, and enhance build summary --- .github/workflows/build-schemes.yml | 33 ++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-schemes.yml b/.github/workflows/build-schemes.yml index 9da4d57..eb53e93 100644 --- a/.github/workflows/build-schemes.yml +++ b/.github/workflows/build-schemes.yml @@ -9,7 +9,9 @@ on: jobs: build-schemes: - runs-on: ubuntu-latest + runs-on: nixos + env: + HOSTNAME: server steps: - uses: actions/checkout@v4 @@ -44,9 +46,38 @@ jobs: wait echo "All schemes built successfully!" + - name: Configure Attic cache + run: | + # Configure attic client to use your cache server + attic login servidos https://cache.servidos.lat ${{ secrets.ATTIC_TOKEN }} + + - name: Push schemes to cache + run: | + echo "Pushing all scheme 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 each scheme build individually for better cache granularity + for scheme in ${{ steps.schemes.outputs.schemes }}; do + echo "Pushing scheme $scheme to cache..." + nix build .#nixosConfigurations.${HOSTNAME}.config.system.build.toplevel \ + --override-input stylix-scheme $scheme \ + --print-out-paths | attic push servidos:nixos --stdin + done + echo "All schemes pushed to cache successfully!" + - name: Upload build artifacts uses: actions/upload-artifact@v4 with: name: nixos-configurations path: ./result-* retention-days: 7 + + - name: Summary + run: | + echo "✅ Color scheme builds completed successfully!" + echo "- Built all ${{ steps.schemes.outputs.schemes }} schemes" + echo "- Pushed all builds to Atticd cache" + echo "- Uploaded artifacts for backup"