diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f2031aa..c6923d6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -20,6 +20,8 @@ jobs: - name: Calculate build matrix id: set-matrix run: | + # Use `-c` flag with jq for compact output (doesn't keep newlines in + # output which was causing issues when setting the output matrix=$(nix flake show --json | jq -c '.nixosConfigurations | keys') echo "::set-output name=matrix::$matrix" @@ -30,7 +32,7 @@ jobs: - calculate-matrix strategy: fail-fast: false - matrix: + matrix: target: "${{ fromJson(needs.calculate-matrix.outputs.matrix) }}" diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..ae4a755 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,12 @@ +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.3.0 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + - id: check-yaml + - id: check-added-large-files + - repo: https://github.com/kamadorueda/alejandra + rev: 3.0.0 + hooks: + - id: alejandra-system