1
0
Fork 0
mirror of https://git.madhouse-project.org/actions/nix.git synced 2024-10-17 00:04:41 +02: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: with:
flake: ./develop/test flake: ./develop/test
package: "hello" 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" __cmd="shell"
fi 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"