Skip to content
Compare
Choose a tag to compare
@workflow workflow released this 02 Jan 01:54
· 45 commits to main since this release

Support Fully Qualified and Local Flakes

Instead of specifying packages, you can use flakes to specify fully qualified flakes to be available in your script.
This can be used for both local flakes in a flake.nix in your repo, as well as external flakes.

name: "Test"
on:
  pull_request:
  push:
jobs:
  tests:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - name: Install Nix
        uses: cachix/install-nix-action@v18
        with:
          extra_nix_config: |
            access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
      - uses: workflow/nix-shell-action@v3
        with:
          flakes: .#hello,nixpkgs#docker
          script: |
            # Runs hello from a local flake.nix
            hello
            # Uses docker from the nixpkgs registry (see https://raw.githubusercontent.com/NixOS/flake-registry/master/flake-registry.json)
            command -v docker