mirror of
https://git.madhouse-project.org/actions/nix.git
synced 2024-11-24 04:29:17 +01:00
9cdda9ed9f
Signed-off-by: Gergely Nagy <me@gergo.csillger.hu>
13 lines
308 B
Bash
Executable file
13 lines
308 B
Bash
Executable file
#! /usr/bin/env bash
|
|
set -eo pipefail
|
|
|
|
workdir="$(mktemp -d)"
|
|
trap 'rm -rf "$workdir"' EXIT
|
|
echo "${INPUT_RUN}" >"${workdir}/run.sh"
|
|
|
|
__cmd="develop"
|
|
if [ "$(basename "$0")" = "nix-shell" ]; then
|
|
__cmd="shell"
|
|
fi
|
|
|
|
nix "${__cmd}" "${INPUT_FLAKE}#${INPUT_PACKAGE}" -c bash -eo pipefail "${workdir}/run.sh"
|