Skip to content

Commit

Permalink
fix: generic generator on macos runners (#3016)
Browse files Browse the repository at this point in the history
Fixes an issue with the `base64` call to generate subject data on
macOS-based runners.

Fixes and closes #3015.

---------

Signed-off-by: Sam Gammon <[email protected]>
  • Loading branch information
sgammon authored Dec 5, 2023
1 parent 62a6671 commit e092404
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,12 @@ runs:
set -euo pipefail
object="{\"artifact_name\": \"${UNTRUSTED_ARTIFACT_NAME}\", \"sha256\": \"${SHA256}\", \"filename\": \"${UNTRUSTED_FILENAME}\"}"
echo "$object" | jq
base64_object=$(echo "$object" | base64 -w0)
if test "$RUNNER_OS" = "macOS"
then
base64_object=$(echo "$object" | base64)
else
base64_object=$(echo "$object" | base64 -w0)
fi
echo "$object" | jq
echo "base64=${base64_object}" >> "$GITHUB_OUTPUT"

0 comments on commit e092404

Please sign in to comment.