Update CI workflow to use NixOS, configure Attic cache, and enhance build summary
This commit is contained in:
parent
e15b93c43a
commit
c238a15f31
33
.github/workflows/build-schemes.yml
vendored
33
.github/workflows/build-schemes.yml
vendored
@ -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"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user