name: Check config

on:
  push:
    branches:
      - main
  workflow_dispatch:
  schedule:
    - cron: "0 0 * * *"

jobs:
  build:
    runs-on: ubuntu-latest
    container: git.alexdelcamp.fr/alexandre_1a/flake-actions:latest

    steps:
      #- name: Install nix
      #  uses: DeterminateSystems/nix-installer-action@main

      - name: Checkout
        uses: actions/checkout@v4

      - name: Check flake
        run: |
          nix flake check

      - name: Notify routine
        run: |
          curl \
          -H "Title: [Routine] Flake checked" \
          -d "Flake is checked, all clear !" \
          https://ntfy.alexdelcamp.fr/FlakeBuild
