Skip to content

Commit

Permalink
Tweak shell syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
obscurerichard committed May 23, 2024
1 parent 7b777e7 commit afa0ba3
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions bin/run_fawltydeps
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,24 @@ exit_code=$?
# See https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#multiline-strings
DELIMITER=$(echo $RANDOM | md5sum | head -c 20)
{
echo "fawltydeps-output<<${DELIMITER}"
echo "${fawltydeps_result}"
echo "${DELIMITER}"
} >> "${GITHUB_OUTPUT}"
echo "fawltydeps-output<<$DELIMITER"
echo "$fawltydeps_result"
echo "$DELIMITER"
} >> "$GITHUB_OUTPUT"

if [[ "$exit_code" -eq 0 ]]; then
echo "OK: 'fawltydeps $*' :rocket:" > "$GITHUB_STEP_SUMMARY"
else
echo "Error: 'fawltydeps $*' found issues:"
fi
if [[ -n "${fawltydeps_result}" ]]; then
# shellcheck disable=SC2006
cat <<EOF > "$GITHUB_STEP_SUMMARY"
{
if [[ "$exit_code" -eq 0 ]]; then
echo "OK: 'fawltydeps $*' :rocket:"
else
echo "Error: 'fawltydeps $*' found issues:"
fi
if [[ -n "${fawltydeps_result}" ]]; then
# shellcheck disable=SC2006
cat <<EOF
\`\`\`
${fawltydeps_result}
\`\`\`
EOF
fi
} >> "$GITHUB_STEP_SUMMARY"
exit $exit_code

0 comments on commit afa0ba3

Please sign in to comment.