diff --git a/entrypoint.sh b/entrypoint.sh index 270de3f..e59aae7 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -21,9 +21,17 @@ while IFS= read -r f; do -v "${PWD}":/home/user \ git.lerch.org/lobo/pkcs11:1 \ -s --id "${INPUT_SLOT}" -m SHA256-RSA-PKCS -i "$f" -o "${dest_sig}" --pin env:INPUT_USER_PIN + ec=$? + if [ $ec -ne 0 ]; then + exit $ec + fi if [ -n "${INPUT_PUBLIC_KEY}" ]; then echo "Public key specified. Uploading to sigstore public transparency log" rekor upload --artifact "$f" --signature "${dest_sig}" --pki-format x509 --public-key public_key + ec=$? + if [ $ec -ne 0 ]; then + exit $ec + fi fi done <