ci: add check and format workflows
This commit is contained in:
parent
6f3ab0b8d3
commit
082722b2a8
3 changed files with 94 additions and 21 deletions
57
.github/workflows/cachix.yaml
vendored
57
.github/workflows/cachix.yaml
vendored
|
|
@ -1,30 +1,45 @@
|
||||||
name: Build Packages
|
name: "Build packages and push to cache"
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
paths:
|
paths:
|
||||||
- "outputs/pkgs/**"
|
- outputs/pkgs/**
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
concurrency:
|
||||||
|
group: ooknet-cache-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
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:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- name: Checkout
|
||||||
- uses: cachix/install-nix-action@v25
|
uses: actions/checkout@v4
|
||||||
- uses: cachix/cachix-action@v14
|
- name: Setup Nix
|
||||||
with:
|
uses: DeterminateSystems/nix-installer-action@main
|
||||||
name: ooknet
|
- name: Magic Nix Cache
|
||||||
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
uses: DeterminateSystems/magic-nix-cache-action@main
|
||||||
- name: Build packages
|
- name: Setup Cachix
|
||||||
run: |
|
uses: cachix/cachix-action@v15
|
||||||
nix build \
|
with:
|
||||||
.#ook-vim \
|
name: ooknet
|
||||||
.#live-buds-cli \
|
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
||||||
.#caddy-with-cloudflare \
|
extraPullNames: nix-community
|
||||||
.#fpp-config \
|
- name: Check Flake
|
||||||
.#fpp-launcher \
|
run: nix flake check
|
||||||
.#fpp-sd \
|
- name: Build packages
|
||||||
.#project-plus \
|
run: nix build .#${{ matrix.package }} --print-build-logs
|
||||||
.#repomix \
|
continue-on-error: true
|
||||||
.#website \
|
|
||||||
.#wii-u-gc-adapter
|
|
||||||
|
|
|
||||||
24
.github/workflows/check.yaml
vendored
Normal file
24
.github/workflows/check.yaml
vendored
Normal file
|
|
@ -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
|
||||||
34
.github/workflows/format.yaml
vendored
Normal file
34
.github/workflows/format.yaml
vendored
Normal file
|
|
@ -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
|
||||||
Loading…
Add table
Add a link
Reference in a new issue