nyxexprs/.github/workflows/build.yml
dependabot[bot] 4aa7331092
build(deps): bump actions/checkout from 6 to 7
Bumps [actions/checkout](https://github.com/actions/checkout) from 6 to 7.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-22 01:03:04 +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@v7
- name: "Install Nix"
uses: cachix/install-nix-action@v31.10.6
- 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