mirror of
https://github.com/daylinmorgan/oizys.git
synced 2024-08-21 14:47:18 -05:00
56 lines
1.3 KiB
YAML
56 lines
1.3 KiB
YAML
name: Build NixOS (on demand)
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
host:
|
|
description: 'list of hosts to build'
|
|
required: true
|
|
default: 'othalan algiz'
|
|
type: string
|
|
lockFile:
|
|
description: 'flake.lock file'
|
|
type: string
|
|
|
|
workflow_call:
|
|
inputs:
|
|
host:
|
|
description: 'list of hosts to build'
|
|
required: true
|
|
default: 'othalan aligz'
|
|
type: string
|
|
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}-${{ inputs.host }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- uses: ./.github/actions/clean-disk
|
|
|
|
- uses: DeterminateSystems/nix-installer-action@main
|
|
- 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: |
|
|
for host in ${{ inputs.host }}; do
|
|
nix run . --accept-flake-config -- cache --host "$host" --flake .
|
|
done
|