another cicd test

This commit is contained in:
Danilo Reyes 2025-09-28 12:06:58 -06:00
parent c7a477404d
commit e86ca773b8
4 changed files with 49 additions and 1250 deletions

View File

@ -3,7 +3,7 @@ name: Weekly NixOS Build & Cache
on: on:
schedule: schedule:
# Run every Sunday at 2 AM UTC # Run every Sunday at 2 AM UTC
- cron: '0 2 * * 0' - cron: "0 2 * * 0"
workflow_dispatch: # Allow manual trigger workflow_dispatch: # Allow manual trigger
jobs: jobs:
@ -20,38 +20,38 @@ jobs:
git config user.name "NixOS Builder Bot" git config user.name "NixOS Builder Bot"
git config user.email "noreply@servidos.lat" git config user.email "noreply@servidos.lat"
- name: Update flake inputs # - name: Update flake inputs
run: | # run: |
nix flake update # nix flake update
- name: Check for changes # - name: Check for changes
id: check_changes # id: check_changes
run: | # run: |
if git diff --quiet flake.lock; then # if git diff --quiet flake.lock; then
echo "changes=false" >> $GITHUB_OUTPUT # echo "changes=false" >> $GITHUB_OUTPUT
echo "No changes in flake.lock" # echo "No changes in flake.lock"
else # else
echo "changes=true" >> $GITHUB_OUTPUT # echo "changes=true" >> $GITHUB_OUTPUT
echo "Changes detected in flake.lock" # echo "Changes detected in flake.lock"
fi # fi
- name: Configure Attic cache - name: Configure Attic cache
if: steps.check_changes.outputs.changes == 'true' if: steps.check_changes.outputs.changes == 'true'
run: | run: |
# Configure attic client to use your cache server # Configure attic client to use your cache server
attic login servidos https://cache.servidos.lat ${{ secrets.ATTIC_TOKEN }} attic login servidos https://cache.servidos.lat ${{ secrets.ATTIC_TOKEN }}
- name: Build workstation configuration - name: Build workstation configuration
if: steps.check_changes.outputs.changes == 'true' if: steps.check_changes.outputs.changes == 'true'
run: | run: |
echo "Building workstation configuration..." echo "Building workstation configuration..."
nix build .#nixosConfigurations.workstation.config.system.build.toplevel nix build .#nixosConfigurations.workstation.config.system.build.toplevel --quiet
- name: Build server configuration - name: Build server configuration
if: steps.check_changes.outputs.changes == 'true' if: steps.check_changes.outputs.changes == 'true'
run: | run: |
echo "Building server configuration..." echo "Building server configuration..."
nix build .#nixosConfigurations.server.config.system.build.toplevel nix build .#nixosConfigurations.server.config.system.build.toplevel --quiet
- name: Push to cache - name: Push to cache
if: steps.check_changes.outputs.changes == 'true' if: steps.check_changes.outputs.changes == 'true'
@ -61,25 +61,25 @@ jobs:
if ls result* 1> /dev/null 2>&1; then if ls result* 1> /dev/null 2>&1; then
attic push servidos:nixos result* attic push servidos:nixos result*
fi fi
# Push the specific system derivations we just built # 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.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 .#nixosConfigurations.server.config.system.build.toplevel --print-out-paths | attic push servidos:nixos --stdin
- name: Commit updated flake.lock - name: Commit updated flake.lock
if: steps.check_changes.outputs.changes == 'true' if: steps.check_changes.outputs.changes == 'true'
run: | run: |
git add flake.lock git add flake.lock
git commit -m "Weekly flake update: $(date -u '+%Y-%m-%d %H:%M UTC')" git commit -m "Weekly flake update: $(date -u '+%Y-%m-%d %H:%M UTC')"
git push origin main git push origin main
- name: Create release tag - name: Create release tag
if: steps.check_changes.outputs.changes == 'true' if: steps.check_changes.outputs.changes == 'true'
run: | run: |
TAG_NAME="weekly-$(date -u '+%Y-%m-%d')" TAG_NAME="weekly-$(date -u '+%Y-%m-%d')"
git tag -a "$TAG_NAME" -m "Weekly build and cache update for $(date -u '+%Y-%m-%d')" git tag -a "$TAG_NAME" -m "Weekly build and cache update for $(date -u '+%Y-%m-%d')"
git push origin "$TAG_NAME" git push origin "$TAG_NAME"
- name: Summary - name: Summary
run: | run: |
if [[ "${{ steps.check_changes.outputs.changes }}" == "true" ]]; then if [[ "${{ steps.check_changes.outputs.changes }}" == "true" ]]; then
@ -90,4 +90,4 @@ jobs:
echo "- Committed changes and created release tag" echo "- Committed changes and created release tag"
else else
echo " No updates needed - flake.lock is already up to date" echo " No updates needed - flake.lock is already up to date"
fi fi

View File

@ -80,4 +80,28 @@ in
}; };
}; };
}; };
cheems = mkScheme {
color = "yellow";
name = "equilibrium-light";
polarity = "light";
image = ../wallpapers/cheems.png;
base16Scheme = {
base00 = "#f5f0e9"; # very light cream
base01 = "#e8ddd4"; # light beige
base02 = "#d4c4b0"; # warm tan
base03 = "#b8a082"; # golden brown
base04 = "#9c7c5a"; # medium brown
base05 = "#7a5f3f"; # darker brown
base06 = "#5c4328"; # dark brown
base07 = "#3e2d1a"; # very dark brown
base08 = "#d2691e"; # golden orange
base09 = "#cd853f"; # peru
base0A = "#daa520"; # goldenrod
base0B = "#228b22"; # forest green
base0C = "#20b2aa"; # light sea green
base0D = "#4169e1"; # royal blue
base0E = "#8b008b"; # dark magenta
base0F = "#dc143c"; # crimson
};
};
} }

View File

@ -6,7 +6,7 @@
}: }:
let let
schemesFile = import ./schemes.nix { inherit pkgs; }; schemesFile = import ./schemes.nix { inherit pkgs; };
scheme = schemesFile.schemes.jesus; scheme = schemesFile.schemes.cheems;
cfg = config.my.stylix; cfg = config.my.stylix;
in in
{ {

1225
flake.lock generated

File diff suppressed because it is too large Load Diff