Skip to content

GHA builds only when Garnix fails evaluation check #232

GHA builds only when Garnix fails evaluation check

GHA builds only when Garnix fails evaluation check #232

Workflow file for this run

name: NixOS
on:
pull_request:
paths-ignore:
- 'home/**'
push:
branches:
- master
paths-ignore:
- 'GNOME.md'
- 'README.md'
- 'notes/**'
- '.git-crypt/**'
- '.gitattributes'
- '.gitignore'
- 'home/**'
- 'outputs/hm.nix'
- 'switch'
- '.mergify.yml'
- 'garnix.yaml'
jobs:
build:
runs-on: ubuntu-latest
#if: github.action == 'Garnix CI / Evaluate flake.nix'
#if: >-
#github.event.state == 'error' ||
#github.event.state == 'failure'
strategy:
fail-fast: true
matrix:
hostname:
- dell-xps
- thinkpad-x1
- tongfang-amd
- xmod
steps:
- uses: actions/[email protected]
- name: "Install Nix ❄️"
uses: cachix/install-nix-action@v30
- name: "Install Cachix ❄️"
uses: cachix/cachix-action@v15
with:
name: gvolpe-nixos
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
# Needed because cachix is also installed by Home Manager
- name: "Set priority flag for Cachix 🚩"
run: nix-env --set-flag priority 0 cachix
- name: "DEBUG"
run: |
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/gvolpe/nix-config/commits/${{ github.sha }}/check-runs
- name: "Free Disk Space (Ubuntu)"
uses: jlumbroso/free-disk-space@main
with:
tool-cache: true
- name: "Build ${{ matrix.config_name }} NixOS config ❄️"
run: nix build .#nixosConfigurations.${{ matrix.hostname }}.config.system.build.toplevel -L