Skip to content

feat(github-actions): caching and autoupdating #10

feat(github-actions): caching and autoupdating

feat(github-actions): caching and autoupdating #10

name: Nix Flake actions
on:
workflow_dispatch:
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@v27
- 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:

Check failure on line 32 in .github/workflows/nix-github-actions.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/nix-github-actions.yml

Invalid workflow file

You have an error in your yaml syntax on line 32
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v27
- uses: cachix/cachix-action@v15
with:
name: mur
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Build "${{ matrix.attr }}"
run: nix build -L ".#${{ matrix.attr }}"
nix-build-stable:
needs: nix-matrix
runs-on: ${{ matrix.os }}
strategy:
matrix: ${{fromJSON(needs.nix-matrix.outputs.matrix)}}
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v27
- uses: cachix/cachix-action@v15
with:
name: mur
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Build "${{ matrix.attr }}"
run: nix build --inputs-from . --override-input nixpkgs stable -L ".#${{ matrix.attr }}"