Use nix-matrix to run all flake checks in github action #20
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Generated with https://github.com/nix-community/nix-github-actions | |
# > nix run github:nix-community/nix-github-actions | |
# TODO currently does not work because of https://github.com/orgs/community/discussions/8305 | |
name: Commit | |
on: | |
pull_request: | |
push: | |
jobs: | |
nix-matrix: | |
runs-on: ubuntu-latest | |
outputs: | |
matrix: ${{ steps.set-matrix.outputs.matrix }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: cachix/install-nix-action@v22 | |
- id: set-matrix | |
name: Generate Nix Matrix | |
run: | | |
set -Eeu | |
echo "matrix=$(nix eval --json '.#githubActions.matrix')" >> "$GITHUB_OUTPUT" | |
nix-build: | |
needs: nix-matrix | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: ${{fromJSON(needs.nix-matrix.outputs.matrix)}} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: cachix/install-nix-action@v22 | |
- run: nix build -L ".#${{ matrix.attr }}" |