pass url directly rather than downloading through curl

This commit is contained in:
Emil Lerch 2023-03-27 22:25:01 -07:00
parent d5a548bb06
commit 7d901e80ce
Signed by: lobo
GPG Key ID: A7B62D657EF764F8

View File

@ -1,9 +1,5 @@
#!/bin/sh #!/bin/sh
if [ -n "${INPUT_PUBLIC_KEY}" ]; then
curl -sLO "${INPUT_PUBLIC_KEY}" public_key
fi
dir="$(dirname "${INPUT_FILES}")" dir="$(dirname "${INPUT_FILES}")"
glob="$(basename "${INPUT_FILES}")" glob="$(basename "${INPUT_FILES}")"
if [ "${glob}" = "**" ]; then if [ "${glob}" = "**" ]; then
@ -36,7 +32,7 @@ while IFS= read -r f; do
docker rm "${container}" docker rm "${container}"
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 "${INPUT_PUBLIC_KEY}"
ec=$? ec=$?
if [ $ec -ne 0 ]; then if [ $ec -ne 0 ]; then
exit $ec exit $ec