capture and pass along exit code in case of failures
This commit is contained in:
		
							parent
							
								
									ecf1ab5376
								
							
						
					
					
						commit
						72ad4c61b4
					
				
					 1 changed files with 8 additions and 0 deletions
				
			
		|  | @ -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 <<ALLFILES_INPUT | ||||
| $all_files | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue