Skip to content

Merge branch 'main' of github.com:anthr76/snowflake #10

Merge branch 'main' of github.com:anthr76/snowflake

Merge branch 'main' of github.com:anthr76/snowflake #10

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@v4
- uses: cachix/install-nix-action@v26
- id: set-matrix
name: Generate Nix Matrix
run: |
set -euo pipefail
matrix="$(nix eval --json '.#githubActions.matrix')"
echo "matrix=$matrix" >> "$GITHUB_OUTPUT"
echo "$matrix" | jq
nix-build:
needs: nix-matrix
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false # let it build all the targets
matrix: ${{fromJSON(needs.nix-matrix.outputs.matrix)}}
steps:
# Make space for large NixOS closures
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
tool-cache: false
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: false
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v26
- uses: DeterminateSystems/magic-nix-cache-action@main
- uses: cachix/cachix-action@v14
with:
name: snowflake
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- run: nix build -L ".#githubActions.checks.${{ matrix.attr }}"