From 4500cb117bba7d04e8cca34086b13735b8297238 Mon Sep 17 00:00:00 2001 From: Aly Raffauf Date: Mon, 15 Jul 2024 09:16:36 -0400 Subject: [PATCH] github: add build workflow with cachix support --- .github/workflows/nix-build.yml | 92 +++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 .github/workflows/nix-build.yml diff --git a/.github/workflows/nix-build.yml b/.github/workflows/nix-build.yml new file mode 100644 index 00000000..14307f32 --- /dev/null +++ b/.github/workflows/nix-build.yml @@ -0,0 +1,92 @@ +name: "nix-build" +on: + push: + paths-ignore: + - '.github/**' + - '_img/**' + workflow_dispatch: +jobs: + default-build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@main + with: + fetch-depth: 1 + - uses: DeterminateSystems/nix-installer-action@main + - uses: DeterminateSystems/magic-nix-cache-action@main + - uses: cachix/cachix-action@master + with: + name: alyraffauf + authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' + - name: Build default package + run: nix build --accept-flake-config .#packages.x86_64-linux.default + fallarbor-build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@main + with: + fetch-depth: 1 + - uses: DeterminateSystems/nix-installer-action@main + - uses: DeterminateSystems/magic-nix-cache-action@main + - uses: cachix/cachix-action@master + with: + name: alyraffauf + authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' + - name: Build fallarbor + run: nix build --accept-flake-config .#nixosConfigurations.fallarbor.config.system.build.toplevel + lavaridge-build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@main + with: + fetch-depth: 1 + - uses: DeterminateSystems/nix-installer-action@main + - uses: DeterminateSystems/magic-nix-cache-action@main + - uses: cachix/cachix-action@master + with: + name: alyraffauf + authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' + - name: Build lavaridge + run: nix build --accept-flake-config .#nixosConfigurations.lavaridge.config.system.build.toplevel + mauville-build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@main + with: + fetch-depth: 1 + - uses: DeterminateSystems/nix-installer-action@main + - uses: DeterminateSystems/magic-nix-cache-action@main + - uses: cachix/cachix-action@master + with: + name: alyraffauf + authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' + - name: Build mauville + run: nix build --accept-flake-config .#nixosConfigurations.mauville.config.system.build.toplevel + petalburg-build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@main + with: + fetch-depth: 1 + - uses: DeterminateSystems/nix-installer-action@main + - uses: DeterminateSystems/magic-nix-cache-action@main + - uses: cachix/cachix-action@master + with: + name: alyraffauf + authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' + - name: Build petalburg + run: nix build --accept-flake-config .#nixosConfigurations.petalburg.config.system.build.toplevel + rustboro-build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@main + with: + fetch-depth: 1 + - uses: DeterminateSystems/nix-installer-action@main + - uses: DeterminateSystems/magic-nix-cache-action@main + - uses: cachix/cachix-action@master + with: + name: alyraffauf + authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' + - name: Build rustboro + run: nix build --accept-flake-config .#nixosConfigurations.rustboro.config.system.build.toplevel \ No newline at end of file