cicd schemes

This commit is contained in:
2025-10-02 22:08:00 -06:00
parent 1ba04c465f
commit e15b93c43a
4 changed files with 161 additions and 0 deletions

52
.github/workflows/build-schemes.yml vendored Normal file
View File

@@ -0,0 +1,52 @@
name: Build All Color Schemes
on:
push:
paths:
- 'config/schemes.nix'
- 'config/scheme-utils.nix'
workflow_dispatch:
jobs:
build-schemes:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Nix
uses: cachix/install-nix-action@v23
with:
nix_path: nixpkgs=channel:nixpkgs-unstable
- name: Get available schemes
id: schemes
run: |
SCHEMES=$(nix eval --raw --expr '
let
pkgs = import <nixpkgs> {};
inputs = {};
utils = import ./scripts/scheme-utils.nix { inherit pkgs inputs; };
in
builtins.concatStringsSep " " utils.availableSchemes
')
echo "schemes=$SCHEMES" >> $GITHUB_OUTPUT
echo "Available schemes: $SCHEMES"
- name: Build all schemes
run: |
for scheme in ${{ steps.schemes.outputs.schemes }}; do
echo "Building scheme: $scheme"
nix build .#nixosConfigurations.${HOSTNAME}.config.system.build.toplevel \
--override-input stylix-scheme $scheme \
--out-link ./result-$scheme &
done
wait
echo "All schemes built successfully!"
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: nixos-configurations
path: ./result-*
retention-days: 7