From f9f147e5ec91f8f3e8ea1b0035e881e3096db119 Mon Sep 17 00:00:00 2001 From: ulic-youthlic Date: Fri, 7 Nov 2025 13:36:13 +0800 Subject: [PATCH] feat: Try to add cachix support in github action --- .github/workflows/test.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..b2616fc --- /dev/null +++ b/.github/workflows/test.yml @@ -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