dotfiles

My PC Dotfiles & Website

shell.yml (1172B)


name: "ci: Check `devShells`"
on:
  push:
    paths:
      - "shells/**"
env:
  NIX_SHOW_STATS: 1
jobs:
  shell:
    runs-on: ubuntu-latest
    steps:
      - name: Clone Repo
        uses: actions/checkout@v7
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
          fetch-depth: 0
      - name: Install Nix
        uses: cachix/install-nix-action@v31
        with:
          extra_nix_config: |
            experimental-features = nix-command flakes
            accept-flake-config = true
            access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
      - name: Setup Cachix
        uses: cachix/cachix-action@v17
        with:
          name: maydayv7-dotfiles
          authToken: "${{ secrets.CACHIX_TOKEN }}"
      - name: Check Shells
        run: |
          shells="$(nix eval --raw '.#devShells.x86_64-linux' \
            --apply 's: builtins.concatStringsSep " " (builtins.attrNames s)')"

          status=0
          for shell in ${shells}
          do
            echo "::group::Checking '${shell}'"
            nix develop ".#${shell}" --command true || status=1
            echo "::endgroup::"
          done
          exit "${status}"