Skip to content

GHA builds only when Garnix fails evaluation check (#286) #573

GHA builds only when Garnix fails evaluation check (#286)

GHA builds only when Garnix fails evaluation check (#286) #573

Workflow file for this run

name: Home
on:
pull_request:
push:
branches:
- master
paths-ignore:
- 'GNOME.md'
- 'README.md'
- 'notes/**'
- '.git-crypt/**'
- '.gitattributes'
- '.gitignore'
- 'system/**'
- 'outputs/os.nix'
- 'switch'
- '.mergify.yml'
- 'garnix.yaml'
jobs:
checks:
runs-on: ubuntu-latest
outputs:
garnix: ${{ steps.garnix.outputs.status }}
steps:
- uses: actions/[email protected]
- name: Garnix check status
id: garnix
uses: ./.github/actions/garnix-check
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
build:
runs-on: ubuntu-latest
needs: checks
if: needs.checks.outputs.garnix == 'failure'
strategy:
fail-fast: true
matrix:
config_name:
- hyprland-edp
- hyprland-hdmi
- hyprland-hdmi-mutable
- xmonad-edp
- xmonad-hdmi
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: "Build ${{ matrix.config_name }} Home Manager config 🏠"
run: nix build .#homeConfigurations.${{ matrix.config_name }}.activationPackage -L