diff --git a/.github/workflows/cachix.yaml b/.github/workflows/cachix.yaml index b985f20..584929e 100644 --- a/.github/workflows/cachix.yaml +++ b/.github/workflows/cachix.yaml @@ -1,30 +1,45 @@ -name: Build Packages +name: "Build packages and push to cache" on: push: paths: - - "outputs/pkgs/**" + - outputs/pkgs/** branches: - main +concurrency: + group: ooknet-cache-${{ github.ref }} + cancel-in-progress: true jobs: build: runs-on: ubuntu-latest + strategy: + matrix: + package: + - ook-vim + - live-buds-cli + - caddy-with-cloudflare + - fpp-config + - fpp-launcher + - fpp-sd + - project-plus + - repomix + - website + - wii-u-gc-adapter + - spotify-player steps: - - uses: actions/checkout@v4 - - uses: cachix/install-nix-action@v25 - - uses: cachix/cachix-action@v14 - with: - name: ooknet - authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' - - name: Build packages - run: | - nix build \ - .#ook-vim \ - .#live-buds-cli \ - .#caddy-with-cloudflare \ - .#fpp-config \ - .#fpp-launcher \ - .#fpp-sd \ - .#project-plus \ - .#repomix \ - .#website \ - .#wii-u-gc-adapter + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Nix + uses: DeterminateSystems/nix-installer-action@main + - name: Magic Nix Cache + uses: DeterminateSystems/magic-nix-cache-action@main + - name: Setup Cachix + uses: cachix/cachix-action@v15 + with: + name: ooknet + authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' + extraPullNames: nix-community + - name: Check Flake + run: nix flake check + - name: Build packages + run: nix build .#${{ matrix.package }} --print-build-logs + continue-on-error: true diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml new file mode 100644 index 0000000..875d473 --- /dev/null +++ b/.github/workflows/check.yaml @@ -0,0 +1,24 @@ +name: "Nix Flake Check" +on: + push: + branches: + - main + paths-ignore: + - outputs/pkgs/** + - .github/** +concurrency: + group: ooknet-check-${{ github.ref }} + cancel-in-progress: true +jobs: + nix-flake-check: + name: Evaluate Flake + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Nix + uses: DeterminateSystems/nix-installer-action@main + - name: Magic Nix Cache + uses: DeterminateSystems/magic-nix-cache-action@main + - name: Nix Flake + run: nix flake check diff --git a/.github/workflows/format.yaml b/.github/workflows/format.yaml new file mode 100644 index 0000000..24f2b44 --- /dev/null +++ b/.github/workflows/format.yaml @@ -0,0 +1,34 @@ +name: "Format Flake" +on: + push: + branches: + - main + paths-ignore: + - .github/** + - .gitignore +jobs: + alejandra: + name: Format with Alejandra + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Nix + uses: DeterminateSystems/nix-installer-action@main + - name: Nix Magic Cache + uses: DeterminateSystems/magic-nix-cache-action@main + - name: Format Flake + run: nix run nixpkgs#alejandra -- -c . + deadnix: + name: Dead Code Analysis with Deadnix + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Nix + uses: DeterminateSystems/nix-installer-action@main + - name: Setup Deadnix + uses: cachix/cachix-action@v15 + with: + name: deadnix + - uses: astro/deadnix-action@main