cicd schemes
This commit is contained in:
52
.github/workflows/build-schemes.yml
vendored
Normal file
52
.github/workflows/build-schemes.yml
vendored
Normal 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
|
||||
Reference in New Issue
Block a user