Skip to content

Commit

Permalink
Fix sha256sum command not available on some platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
ItsDrike committed Apr 21, 2023
1 parent 17c1a01 commit ed6a9db
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,10 @@ runs:
run: |
echo "::group::Hash poetry install arguments"
echo "Passed install args: ${{ inputs.install-args }}"
hashed_args=$(echo -n "${{ inputs.install-args }}" | sha256sum | cut -d" " -f1)
if ! command -v sha1sum >/dev/null; then
alias sha1sum="shasum"
fi
hashed_args=$(echo -n "${{ inputs.install-args }}" | sha1sum | cut -d" " -f1)
echo "Resulting hash: $hashed_args"
echo "install-args-hash=$hashed_args" >> $GITHUB_OUTPUT
echo "::endgroup::"
Expand Down

0 comments on commit ed6a9db

Please sign in to comment.