1
0
Fork 0
mirror of https://git.madhouse-project.org/actions/nix.git synced 2024-11-23 20:19:16 +01:00

develop: Run the user script with -eo pipefail

Signed-off-by: Gergely Nagy <me@gergo.csillger.hu>
This commit is contained in:
Gergely Nagy 2023-09-22 21:56:05 +02:00
parent 18b41c0333
commit 1bac4fd767
2 changed files with 17 additions and 1 deletions

View file

@ -36,3 +36,19 @@ jobs:
with:
flake: ./develop/test
package: "hello"
- name: errors within the script should propagate
id: error-check
continue-on-error: true
uses: ./develop
with:
flake: ./develop/test
package: "hello"
run: |
set -x
this-command-does-not-exist | cat
this-command-does-not-exist
- name: make sure the previous step failed
run: |
[ "${{ steps.error-check.outcome }}" = "failure" ]

View file

@ -10,4 +10,4 @@ if [ "$(basename $0)" = "nix-shell" ]; then
__cmd="shell"
fi
nix "${__cmd}" "${INPUT_FLAKE}#${INPUT_PACKAGE}" -c bash "${workdir}/run.sh"
nix "${__cmd}" "${INPUT_FLAKE}#${INPUT_PACKAGE}" -c bash -eo pipefail "${workdir}/run.sh"