oizys/.github/workflows/checks.yml

49 lines
1.3 KiB
YAML
Raw Normal View History

name: Run Nix Flake Checks
on:
2024-06-14 11:54:54 -05:00
workflow_call:
workflow_dispatch:
inputs:
lockFile:
description: 'flake.lock file'
type: string
jobs:
2024-06-18 11:14:15 -05:00
checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
2024-06-14 14:40:02 -05:00
- uses: ./.github/actions/clean-disk
2024-06-14 15:02:01 -05:00
with:
purge-packages: false
2024-06-14 14:40:02 -05:00
- uses: DeterminateSystems/nix-installer-action@main
2024-06-18 11:14:15 -05:00
with:
extra-conf: |
accept-flake-config = true
- uses: DeterminateSystems/magic-nix-cache-action@v7
- uses: cachix/cachix-action@v15
with:
name: daylin
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- name: write lock file
if: "${{ inputs.lockFile != '' }}"
run: |
echo '${{ inputs.lockFile }}' > flake.lock
git diff
- name: Build
run: |
2024-06-18 11:14:15 -05:00
set -euo pipefail
# cachix watch-exec daylin -- nix build '.#checks.x86_64-linux.makePackages'
host=othalan
system_attr=$(nix run . -- output --host "$host" --flake .)
system_path=$(nix derivation show $system_attr | jq -r '.[].inputDrvs | with_entries(select(.key|match("system-path";"i"))) | keys | .[]')
echo "path to system-path drv ==> $system_path"
cachix watch-exec daylin -- nix build --print-build-logs "$system_path^*"