From 273098762354ff4f1f5556fdc3edfd9056225e4e Mon Sep 17 00:00:00 2001 From: Christoph Heiss Date: Wed, 19 Jun 2024 23:01:48 +0200 Subject: [PATCH] ci: add woodpecker workflow for checking flake files Signed-off-by: Christoph Heiss --- .woodpecker/check-flake-files.yaml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .woodpecker/check-flake-files.yaml diff --git a/.woodpecker/check-flake-files.yaml b/.woodpecker/check-flake-files.yaml new file mode 100644 index 0000000..8777561 --- /dev/null +++ b/.woodpecker/check-flake-files.yaml @@ -0,0 +1,23 @@ +--- +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: + - | + for f in flakes/**/*.toml; do + echo "checking flake info for $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