Skip to content

Commit

Permalink
Merge pull request #9 from tomeon/nix-flake-check-ci
Browse files Browse the repository at this point in the history
feat(ci): run Nix flake checks in GitHub Actions workflow
  • Loading branch information
jose1711 authored Mar 15, 2024
2 parents d0d06dd + 4f74684 commit 3ec5695
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
container:
image: ${{ matrix.image }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install testing dependencies
run: |
{ apk add --no-cache ansible sudo ; } || :
Expand All @@ -38,3 +38,15 @@ jobs:
# OpenRC under Alpine Linux) in a container.
run: |
ansible-playbook -vv --become -c local -i localhost, -e kodi_service_enabled=false ./tests/test.yml
nix:
name: Run Nix actions
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v8
- name: Set up Nix cache
uses: DeterminateSystems/magic-nix-cache-action@v3
- name: Run Nix flake checks
run: |
nix flake check -L
5 changes: 5 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@
system,
...
}: {
# `nix run '.#' -- <devshell-command>`
apps.default = config.devShells.default.flakeApp;

devshells.default = {
commands = [
# Local GitHub actions runner. Run `act -j native` to execute the
Expand Down Expand Up @@ -93,6 +96,8 @@
];
};
in {
inherit (config.devShells) default;

rpi4-initrd = rpi4.config.system.build.initialRamdisk;
rpi4-kernel = rpi4.config.system.build.kernel;

Expand Down

0 comments on commit 3ec5695

Please sign in to comment.