Files
common/distros/busybox/entrypoint.sh
2023-04-27 23:18:14 -07:00

16 lines
318 B
Bash

#!/bin/sh
ARGS="$@"
OUTPUT=$(sh -c "$ARGS")
RESULT=$?
echo "$OUTPUT"
#Output multiline strings.
#https://trstringer.com/github-actions-multiline-strings/
if [[ -n "$OUTPUT" ]]; then
echo "console<<EOF" >> "$GITHUB_OUTPUT"
echo "$OUTPUT" >> "$GITHUB_OUTPUT"
echo "EOF" >> "$GITHUB_OUTPUT"
fi
exit $RESULT