mirror of
https://github.com/msfjarvis/custom-nixpkgs.git
synced 2024-06-03 03:58:55 +05:30
34 lines
955 B
YAML
34 lines
955 B
YAML
name: Nix Flake actions
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- master
|
|
- main
|
|
|
|
jobs:
|
|
nix-matrix:
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
|
steps:
|
|
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
|
|
- uses: cachix/install-nix-action@6004951b182f8860210c8d6f0d808ec5b1a33d28 # v25
|
|
- id: set-matrix
|
|
name: Generate Nix Matrix
|
|
run: |
|
|
set -Eeu
|
|
matrix="$(nix eval --json '.#githubActions.matrix')"
|
|
echo "matrix=$matrix" >> "$GITHUB_OUTPUT"
|
|
|
|
nix-build:
|
|
needs: nix-matrix
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix: ${{fromJSON(needs.nix-matrix.outputs.matrix)}}
|
|
steps:
|
|
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
|
|
- uses: cachix/install-nix-action@6004951b182f8860210c8d6f0d808ec5b1a33d28 # v25
|
|
- run: nix build -L ".#${{ matrix.attr }}"
|