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:
parent
18b41c0333
commit
1bac4fd767
2 changed files with 17 additions and 1 deletions
|
@ -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" ]
|
||||||
|
|
|
@ -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"
|
||||||
|
|
Loading…
Reference in a new issue