feat: Try to add cachix support in github action
Some checks are pending
Test Cachix / tests (Tytonidae Akun Cape) (push) Waiting to run

This commit is contained in:
ulic-youthlic 2025-11-07 13:36:13 +08:00
parent f6493cacec
commit f9f147e5ec
Signed by: youthlic
GPG key ID: 63E86C3C14A0D721

29
.github/workflows/test.yml vendored Normal file
View file

@ -0,0 +1,29 @@
name: "Test Cachix"
on:
workflow_dispatch:
pull_request:
branches:
- dev
push:
branches:
- dev
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
hostname: [Tytonidae Akun Cape]
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v25
with:
nix_path: nixpkgs=channel:nixos-unstable
extra_nix_config: |
trusted-public-keys = youthlic.cachix.org-1:zkUZ/ZGGF5fZxvg5WO3K8XAsUAPFmQKWbnAFb3W5x+Y= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= niri.cachix.org-1:Wv0OmO7PsuocRKzfDoJ3mulSl7Z6oezYhGhR+3W2964= nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs= chaotic-nyx.cachix.org-1:HfnXSw4pj95iI/n17rIDy40agHj12WfF+Gqk6SonIT8= nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
substituters = https://youthlic.cachix.org/ https://niri.cachix.org/ https://nix-community.cachix.org/ https://chaotic-nyx.cachix.org/ https://cache.nixos.org/
- uses: cachix/cachix-action@v14
with:
name: youthlic
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- run: nix build .#nixosConfigurations.${{ matrix.hostname }}.config.system.build.toplevel
- run: nix run nixpkgs#toybox -- echo OK