flake.lock: Update #46
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
name: Build | |
on: | |
push: | |
branches: | |
- main | |
- release-** | |
pull_request: | |
permissions: | |
contents: read | |
jobs: | |
evaluate: | |
name: List packages | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install Nix | |
uses: DeterminateSystems/nix-installer-action@main | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
extra-conf: | | |
extra-experimental-features = nix-command flakes | |
- name: Set up cache | |
uses: DeterminateSystems/magic-nix-cache-action@main | |
- name: List packages | |
id: list-packages | |
run: | | |
nix flake show github:${{ github.repository }}/${{ github.event.pull_request.head.sha || github.sha }} --json | jq -rc 'to_entries | map(.key as $type | select($type == "checks" or $type == "packages") | .value | to_entries | map(.key as $arch | select($arch == "x86_64-linux") | .value | to_entries | map({type: $type, arch: $arch, os: (if $arch == "x86_64-linux" then "ubuntu-latest" else "macos-latest" end), key: .key})) | flatten) | flatten | "packages=\(.)"' >> $GITHUB_OUTPUT | |
outputs: | |
packages: ${{ steps.list-packages.outputs.packages }} | |
build: | |
needs: evaluate | |
strategy: | |
fail-fast: false | |
matrix: | |
build: ${{ fromJSON(needs.evaluate.outputs.packages) }} | |
name: ${{ matrix.build.key }} on ${{ matrix.build.arch }} | |
runs-on: ${{ matrix.build.os }} | |
steps: | |
- name: Install Nix | |
uses: cachix/install-nix-action@v27 | |
with: | |
github_access_token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Set up Cachix | |
uses: cachix/cachix-action@v15 | |
with: | |
name: autofirma-nix | |
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' | |
- name: Build ${{ matrix.build.key }} | |
run: nix -L --accept-flake-config build github:${{ github.repository }}/${{ github.event.pull_request.head.sha || github.sha }}#${{ matrix.build.type }}.${{ matrix.build.arch }}.${{ matrix.build.key }} --no-update-lock-file | |
check: | |
name: Check readiness for nixos-search | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install Nix | |
uses: DeterminateSystems/nix-installer-action@main | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
extra-conf: | | |
extra-experimental-features = nix-command flakes | |
- name: Check flake-info | |
id: flake-info | |
run: | | |
nix run github:NixOS/nixos-search#flake-info -- --json flake github:${{ github.repository }}/${{ github.event.pull_request.head.sha || github.sha }} | jq . |