dotfiles

My PC Dotfiles & Website

.github/workflows/shell.yml (1172B)


 1name: "ci: Check `devShells`"
 2on:
 3  push:
 4    paths:
 5      - "shells/**"
 6env:
 7  NIX_SHOW_STATS: 1
 8jobs:
 9  shell:
10    runs-on: ubuntu-latest
11    steps:
12      - name: Clone Repo
13        uses: actions/checkout@v7
14        with:
15          token: ${{ secrets.GITHUB_TOKEN }}
16          fetch-depth: 0
17      - name: Install Nix
18        uses: cachix/install-nix-action@v31
19        with:
20          extra_nix_config: |
21            experimental-features = nix-command flakes
22            accept-flake-config = true
23            access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
24      - name: Setup Cachix
25        uses: cachix/cachix-action@v17
26        with:
27          name: maydayv7-dotfiles
28          authToken: "${{ secrets.CACHIX_TOKEN }}"
29      - name: Check Shells
30        run: |
31          shells="$(nix eval --raw '.#devShells.x86_64-linux' \
32            --apply 's: builtins.concatStringsSep " " (builtins.attrNames s)')"
33
34          status=0
35          for shell in ${shells}
36          do
37            echo "::group::Checking '${shell}'"
38            nix develop ".#${shell}" --command true || status=1
39            echo "::endgroup::"
40          done
41          exit "${status}"