ci: Add setup-nix action to reuse nix-related code

This commit is contained in:
Wolfgang Walther
2021-11-21 18:40:42 +01:00
committed by Wolfgang Walther
parent 88283801cb
commit f333305491
2 changed files with 37 additions and 19 deletions
+21
View File
@@ -0,0 +1,21 @@
name: Setup Nix
description: Installs nix, sets up cachix and installs a subset of tooling.
inputs:
authToken:
description: Token to pass to cachix
tools:
description: Tools to install with nix-env -iA <tools>
runs:
using: composite
steps:
- uses: cachix/install-nix-action@v13
- uses: cachix/cachix-action@v10
with:
name: postgrest
authToken: ${{ inputs.authToken }}
- if: ${{ inputs.tools }}
run: nix-env -f default.nix -iA ${{ inputs.tools }}
shell: bash