From 3f6880513f434a6cd37f2ab479342815280305cf Mon Sep 17 00:00:00 2001 From: Stefan Frijters Date: Tue, 1 Oct 2024 22:37:07 +0200 Subject: [PATCH] Tweak CI --- .../{nix-run.yml => check-logwatch.yml} | 21 +++++++++++++++---- README.md | 2 +- 2 files changed, 18 insertions(+), 5 deletions(-) rename .github/workflows/{nix-run.yml => check-logwatch.yml} (64%) diff --git a/.github/workflows/nix-run.yml b/.github/workflows/check-logwatch.yml similarity index 64% rename from .github/workflows/nix-run.yml rename to .github/workflows/check-logwatch.yml index ed5d892..29a2afc 100644 --- a/.github/workflows/nix-run.yml +++ b/.github/workflows/check-logwatch.yml @@ -1,4 +1,4 @@ -name: "nix-run" +name: "check-logwatch" on: pull_request: paths-ignore: @@ -8,7 +8,7 @@ on: - 'README.md' jobs: - nix-run: + check-logwatch: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -16,8 +16,21 @@ jobs: with: github_access_token: ${{ secrets.GITHUB_TOKEN }} - uses: DeterminateSystems/magic-nix-cache-action@v8 - - run: | - nix run . -- --version + + - name: Flake metadata + run: | + nix flake metadata + nix flake show + + - name: Flake check + run: | nix flake check -L + + - name: Run logwatch + run: | + nix run . -- --version + + - name: Formatter check + run: | nix fmt git diff --exit-code diff --git a/README.md b/README.md index 57e775a..57272d0 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # nixos-logwatch -[![nix run](https://github.com/SFrijters/nixos-logwatch/actions/workflows/nix-run.yml/badge.svg)](https://github.com/SFrijters/nixos-logwatch/actions/workflows/nix-run.yml) +[![nix flake check](https://github.com/SFrijters/nixos-logwatch/actions/workflows/check-logwatch.yml/badge.svg)](https://github.com/SFrijters/nixos-logwatch/actions/workflows/check-logwatch.yml) This flake provides a NixOS module for [logwatch](https://sourceforge.net/projects/logwatch/).