1
0
Fork 0
mirror of https://git.madhouse-project.org/actions/nix.git synced 2025-05-09 21:59:53 +02:00

Add a nix/build action

Signed-off-by: Gergely Nagy <me@gergo.csillger.hu>
This commit is contained in:
Gergely Nagy 2023-09-22 20:12:32 +02:00
parent c7e4d24cd2
commit 680f954a87
5 changed files with 116 additions and 0 deletions

12
build/bin/nix-build Executable file
View file

@ -0,0 +1,12 @@
#! /usr/bin/env bash
set -eo pipefail
LOGS=""
case "${INPUT_LOGS}" in
[yY][eE][sS]|[tT][rR][uU][eE]|[oO][nN]|1)
LOGS=-L
;;
esac
nix build ${LOGS} "${INPUT_FLAKE}#${INPUT_PACKAGE}"
echo "output-path=$(readlink result)" >>"${GITHUB_OUTPUT}"