diff --git a/.woodpecker/check-flake-files.yaml b/.woodpecker/check-flake-files.yaml new file mode 100644 index 0000000..8f3cd4c --- /dev/null +++ b/.woodpecker/check-flake-files.yaml @@ -0,0 +1,24 @@ +--- +when: + - event: push + - event: pull_request + path: + 'flakes/**/*.toml' + +steps: + - name: build + image: docker.io/nixos/nix + environment: + NIX_CONFIG: 'experimental-features = nix-command flakes' + RUST_LOG: debug + commands: + - | + shopt -s globstar + for f in flakes/**/*.toml; do + echo "checking $f" + nix run --accept-flake-config .#flake-info -- --json group "$f" "$(basename "$f" .toml)" --report + if [[ -f report.txt ]]; then + cat report.txt + exit 1 + fi + done