mirror of
https://github.com/daylinmorgan/oizys.git
synced 2024-12-22 14:20:44 -06:00
abstract
This commit is contained in:
parent
85ed8b7f78
commit
f1813b4a47
3 changed files with 56 additions and 70 deletions
51
.github/workflows/build.yml
vendored
51
.github/workflows/build.yml
vendored
|
@ -1,30 +1,39 @@
|
|||
name: Build NixOS
|
||||
name: Build NixOS (on demand)
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
host:
|
||||
description: 'host name to build'
|
||||
required: true
|
||||
default: 'othalan'
|
||||
type: string
|
||||
lockFile:
|
||||
description: 'flake.lock file'
|
||||
type: string
|
||||
|
||||
workflow_call:
|
||||
inputs:
|
||||
host:
|
||||
description: 'host name to build'
|
||||
required: true
|
||||
default: 'othalan'
|
||||
type: string
|
||||
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}-${{ inputs.host }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
max-parallel: 1
|
||||
matrix:
|
||||
host:
|
||||
- othalan
|
||||
# - mannaz
|
||||
# - algiz
|
||||
steps:
|
||||
# free up some space
|
||||
- run: sudo rm -rf /opt&
|
||||
|
||||
- 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: cachix/cachix-action@v14
|
||||
|
@ -32,6 +41,12 @@ jobs:
|
|||
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: |
|
||||
nix run . --accept-flake-config -- cache --host "${{ matrix.host }}" --flake .
|
||||
nix run . --accept-flake-config -- cache --host "${{ inputs.host }}" --flake .
|
||||
|
|
52
.github/workflows/on-demand.yml
vendored
52
.github/workflows/on-demand.yml
vendored
|
@ -1,52 +0,0 @@
|
|||
name: Build NixOS (on demand)
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
host:
|
||||
description: 'host name to build'
|
||||
required: true
|
||||
default: 'othalan'
|
||||
type: string
|
||||
lockFile:
|
||||
description: 'flake.lock file'
|
||||
type: string
|
||||
|
||||
workflow_call:
|
||||
inputs:
|
||||
host:
|
||||
description: 'host name to build'
|
||||
required: true
|
||||
default: 'othalan'
|
||||
type: string
|
||||
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}-${{ inputs.host }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# free up some space
|
||||
- run: sudo rm -rf /opt&
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: DeterminateSystems/nix-installer-action@main
|
||||
- uses: DeterminateSystems/magic-nix-cache-action@v2
|
||||
|
||||
- uses: cachix/cachix-action@v14
|
||||
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: |
|
||||
nix run . --accept-flake-config -- cache --host "${{ inputs.host }}" --flake .
|
23
.github/workflows/push.yml
vendored
Normal file
23
.github/workflows/push.yml
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
name: Build NixOS
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
max-parallel: 1
|
||||
matrix:
|
||||
host:
|
||||
- othalan
|
||||
# - mannaz
|
||||
# - algiz
|
||||
uses: ./.github/workflows/build.yml
|
||||
with:
|
||||
host: "${{ matrix.host }}"
|
||||
secrets: inherit
|
Loading…
Reference in a new issue