1. 28
    1. 5

      Even better would be to have a step that “activates” the nix environment.

      - name: "Load environment"
        run: nix develop -c bash -c 'echo $PATH' > "$GITHUB_PATH"
      # Now you can use all the dependencies
      - name: prettier --write
      1. 7

        PATH isn’t the only environment variable nix develop sets, especially when compilers and things like pkg-config are involved

      2. 3

        Can do something similar for makefile dependencies. I wrote a little about it in https://t-ravis.com/post/nix/nix-make/ (using nix-shell) but basically:

        export PATH := $(shell nix-shell -p hello --run 'echo $$PATH')
        .PHONY: all
        	@echo nice hello
        	hello --version
        1. 1

          Oh that’s a nice trick

    2. 1

      Some links are broken, for example the one to action.yml

      1. 1

        Came to mention this as well. The flakes link actually directs to a Notion page containing the same post…

    3. 1

      The giant amount of magic going on behind the scenes of even a simple Actions workflow is one of the main reasons I prefer GitLab and the like. You control the container and the commands, and can easily run things locally. Even easier if you’re just using Nix, where you don’t even need the container. Example.