capture and pass along exit code in case of failures
This commit is contained in:
parent
ecf1ab5376
commit
72ad4c61b4
|
@ -21,9 +21,17 @@ while IFS= read -r f; do
|
||||||
-v "${PWD}":/home/user \
|
-v "${PWD}":/home/user \
|
||||||
git.lerch.org/lobo/pkcs11:1 \
|
git.lerch.org/lobo/pkcs11:1 \
|
||||||
-s --id "${INPUT_SLOT}" -m SHA256-RSA-PKCS -i "$f" -o "${dest_sig}" --pin env:INPUT_USER_PIN
|
-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
|
if [ -n "${INPUT_PUBLIC_KEY}" ]; then
|
||||||
echo "Public key specified. Uploading to sigstore public transparency log"
|
echo "Public key specified. Uploading to sigstore public transparency log"
|
||||||
rekor upload --artifact "$f" --signature "${dest_sig}" --pki-format x509 --public-key public_key
|
rekor upload --artifact "$f" --signature "${dest_sig}" --pki-format x509 --public-key public_key
|
||||||
|
ec=$?
|
||||||
|
if [ $ec -ne 0 ]; then
|
||||||
|
exit $ec
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
done <<ALLFILES_INPUT
|
done <<ALLFILES_INPUT
|
||||||
$all_files
|
$all_files
|
||||||
|
|
Loading…
Reference in New Issue
Block a user