mirror of
https://github.com/HendrikRauh/dmx-interface.git
synced 2026-03-09 13:30:20 +00:00
add(action): create composite action to install Nix with flakes enabled
This commit is contained in:
parent
7a621d4731
commit
c362172cdb
2 changed files with 23 additions and 16 deletions
19
.github/actions/install-nix/action.yml
vendored
Normal file
19
.github/actions/install-nix/action.yml
vendored
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
name: install-nix
|
||||||
|
description: Composite action to checkout the repo and install Nix with flakes enabled
|
||||||
|
runs:
|
||||||
|
using: composite
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v5
|
||||||
|
|
||||||
|
- name: Install Nix
|
||||||
|
uses: cachix/install-nix-action@v31
|
||||||
|
with:
|
||||||
|
extra_nix_config: |
|
||||||
|
experimental-features = nix-command flakes
|
||||||
|
|
||||||
|
- name: Prewarm flake devShell
|
||||||
|
run: |
|
||||||
|
# use the flake devShell defined in ./flake.nix to fetch deps
|
||||||
|
nix develop --command true
|
||||||
|
shell: bash
|
||||||
20
.github/workflows/check.yml
vendored
20
.github/workflows/check.yml
vendored
|
|
@ -11,14 +11,8 @@ jobs:
|
||||||
lint:
|
lint:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Setup checkout + Nix
|
||||||
uses: actions/checkout@v5
|
uses: ./.github/actions/install-nix
|
||||||
|
|
||||||
- name: Install Nix
|
|
||||||
uses: cachix/install-nix-action@v31
|
|
||||||
with:
|
|
||||||
extra_nix_config: |
|
|
||||||
experimental-features = nix-command flakes
|
|
||||||
|
|
||||||
- name: Run pre-commit from flake devShell
|
- name: Run pre-commit from flake devShell
|
||||||
run: |
|
run: |
|
||||||
|
|
@ -29,14 +23,8 @@ jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Setup checkout + Nix
|
||||||
uses: actions/checkout@v5
|
uses: ./.github/actions/install-nix
|
||||||
|
|
||||||
- name: Install Nix
|
|
||||||
uses: cachix/install-nix-action@v31
|
|
||||||
with:
|
|
||||||
extra_nix_config: |
|
|
||||||
experimental-features = nix-command flakes
|
|
||||||
|
|
||||||
- name: Run build from flake devShell
|
- name: Run build from flake devShell
|
||||||
run: |
|
run: |
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue