update on-demand definition

This commit is contained in:
Daylin Morgan 2024-05-23 13:13:04 -05:00
parent fe4730b82c
commit 85ed8b7f78
Signed by: daylin
GPG key ID: 950D13E9719334AD
3 changed files with 19 additions and 7 deletions

View file

@ -14,7 +14,10 @@ jobs:
strategy: strategy:
max-parallel: 1 max-parallel: 1
matrix: matrix:
host: ["othalan", "mannaz", "algiz"] host:
- othalan
# - mannaz
# - algiz
steps: steps:
# free up some space # free up some space
- run: sudo rm -rf /opt& - run: sudo rm -rf /opt&

View file

@ -10,11 +10,19 @@ on:
type: string type: string
lockFile: lockFile:
description: 'flake.lock file' description: 'flake.lock file'
required: true
type: string type: string
workflow_call:
inputs:
host:
description: 'host name to build'
required: true
default: 'othalan'
type: string
concurrency: concurrency:
group: ${{ github.workflow }}-${{ github.ref }} group: ${{ github.workflow }}-${{ github.ref }}-${{ inputs.host }}
cancel-in-progress: true cancel-in-progress: true
jobs: jobs:
@ -23,10 +31,9 @@ jobs:
steps: steps:
# free up some space # free up some space
- run: sudo rm -rf /opt& - run: sudo rm -rf /opt&
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main - uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@v2 - uses: DeterminateSystems/magic-nix-cache-action@v2
- uses: cachix/cachix-action@v14 - uses: cachix/cachix-action@v14
@ -35,11 +42,11 @@ jobs:
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}" authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- name: write lock file - name: write lock file
if: "${{ inputs.lockFile != '' }}"
run: | run: |
echo '${{ inputs.lockFile }}' > flake.lock echo '${{ inputs.lockFile }}' > flake.lock
git diff git diff
- name: Build - name: Build
run: | run: |
nix run . --accept-flake-config -- cache --host "${{ inputs.host }}" --flake . nix run . --accept-flake-config -- cache --host "${{ inputs.host }}" --flake .

View file

@ -12,4 +12,6 @@
- [ ] find out why pixi on GHA is different from local (possibly from the fetch git step?) - [ ] find out why pixi on GHA is different from local (possibly from the fetch git step?)
- [ ] rework CI so it's not building all systems on every pull
<!-- generated with <3 by daylinmorgan/todo --> <!-- generated with <3 by daylinmorgan/todo -->