Experimenting with CI #22
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test Nix Flake | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
nix-flake-build: | |
runs-on: ubuntu-latest | |
name: Build Nix Flake | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Install Nix | |
uses: cachix/install-nix-action@v13 | |
# Initialize a new Nix flake | |
- name: Initialize Nix Flake | |
run: | | |
mkdir -p my-config && cd my-config | |
nix flake --extra-experimental-features 'nix-command flakes' init -t github:dustinlyons/nixos-config#starter | |
# Apply CI user info | |
- name: Apply CI User Info | |
run: | | |
cd /home/runner/work/nixos-config/nixos-config/my-config | |
/home/runner/work/nixos-config/nixos-config/bin/apply-ci | |
# Build the Nix Flake | |
- name: Build Nix Flake | |
run: | | |
cd /home/runner/work/nixos-config/nixos-config/my-config | |
git add . | |
nix build --extra-experimental-features 'nix-command flakes' .#x86_64-linux |