nyxexprs/.github/workflows/build.yml
dependabot[bot] 146937bf06
build(deps): bump cachix/install-nix-action from 31.8.2 to 31.8.4
Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from 31.8.2 to 31.8.4.
- [Release notes](https://github.com/cachix/install-nix-action/releases)
- [Changelog](https://github.com/cachix/install-nix-action/blob/master/RELEASE.md)
- [Commits](https://github.com/cachix/install-nix-action/compare/v31.8.2...v31.8.4)

---
updated-dependencies:
- dependency-name: cachix/install-nix-action
  dependency-version: 31.8.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-24 01:08:07 +00:00

49 lines
1.5 KiB
YAML

name: Build
on:
workflow_dispatch:
workflow_call:
secrets:
CACHIX_AUTH_TOKEN:
required: false
permissions:
contents: read
id-token: write
jobs:
find-uncached:
name: "Find uncached packages"
if: github.repository == 'notashelf/nyxexprs'
runs-on: ubuntu-latest
outputs:
uncached: ${{ steps.get-packages.outputs.packages }}
steps:
- uses: actions/checkout@v5
- name: "Install Nix"
uses: cachix/install-nix-action@v31.8.4
- name: Find packages missing in the cache
id: get-packages
run: |
set -euo pipefail
packages='[]'
while read -r package; do
path="$(nix eval --raw ".#$package" 2>/dev/null)"
if ! nix path-info --store https://nyx.cachix.org "$path" &>/dev/null; then
echo "Building $package"
packages="$(echo -n "$packages" | jq --arg package "$package" --compact-output '. + [$package]')"
fi
done < <(nix flake show --json 2>/dev/null | jq --raw-output '.packages."x86_64-linux" | keys_unsorted | map("packages.x86_64-linux.\(.)") | .[]')
echo -n "packages=$packages" >> "$GITHUB_OUTPUT"
build-uncached:
needs: find-uncached
strategy:
matrix:
package: ${{ fromJSON(needs.find-uncached.outputs.uncached) }}
uses: ./.github/workflows/nix.yml
with:
command: nix build "github:notashelf/nyxexprs/${{ github.ref }}#${{ matrix.package }}"
secrets: inherit