diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 5a7042b..2ee7501 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -26,18 +26,23 @@ jobs: format-check: name: Format Check runs-on: [self-hosted, nix-builder] + timeout-minutes: 5 steps: - name: Checkout repository uses: actions/checkout@v4 - name: Check formatting + timeout-minutes: 3 run: | - nix fmt **/*.nix - if ! git diff --quiet; then + set -euo pipefail + echo "Checking code formatting..." + output=$(nix fmt **/*.nix 2>&1) + if [ -n "$output" ]; then echo "::error::Code is not formatted. Please run 'nix fmt **/*.nix' locally." - git diff + echo "$output" exit 1 fi + echo "All files are properly formatted" eval-configs: name: Evaluate Key Configurations