Skip to content

feat(images): move PR identity off the boot-menu entry #41

feat(images): move PR identity off the boot-menu entry

feat(images): move PR identity off the boot-menu entry #41

Workflow file for this run

# Formatting & linting — verifies the tree is already formatted and lint-clean.
# Formatting and linting are CHECKED here, never applied: CI only fails (with a
# diff) when something is off — fixing it is `make fmt` locally.
#
# Two independent jobs run separate tool sets (treefmt config in ../../treefmt.nix):
# * format → `make fmt/check`: nixfmt + shfmt, check-only (no writes).
# * lint → `make lint`: statix + deadnix + shellcheck, check-only.
# Splitting them means a formatting miss and a lint finding show up as distinct,
# independently-rerunnable checks.
#
# Like the image builds (test.yml / release.yml), Nix is installed on the runner
# with nix-installer-action (flakes enabled) and the /nix/store is cached across
# runs (nix-community/cache-nix-action). `make` runs directly — GNU Make is
# preinstalled on the GitHub Ubuntu runners.
name: Code quality
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
# Cancel superseded runs on the same ref.
concurrency:
group: fmt-${{ github.ref }}
cancel-in-progress: true
jobs:
format:
name: Formatting
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
- name: Cache Nix store
uses: nix-community/cache-nix-action@v6
with:
# Formatting/linting tools (treefmt, statix, …) come from the flake;
# key on the lockfile + Nix sources so the tool closure is reused.
primary-key: nix-fmt-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('flake.lock', '**/*.nix') }}
restore-prefixes-first-match: nix-fmt-${{ runner.os }}-${{ runner.arch }}-
gc-max-store-size-linux: 2G
# Check-only (`--ci`): fails with a diff if anything is unformatted. Does
# NOT modify the tree — run `make fmt` locally to fix.
- name: make fmt/check
run: make fmt/check
lint:
name: Lint
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
- name: Cache Nix store
uses: nix-community/cache-nix-action@v6
with:
# Same tool closure as the format job; key on the lockfile + Nix
# sources so it is reused across runs.
primary-key: nix-fmt-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('flake.lock', '**/*.nix') }}
restore-prefixes-first-match: nix-fmt-${{ runner.os }}-${{ runner.arch }}-
gc-max-store-size-linux: 2G
# Check-only (`--ci`): fails with a diff (statix/deadnix) or findings
# (shellcheck). Does NOT modify the tree.
- name: make lint
run: make lint