17 lines
321 B
Bash
17 lines
321 B
Bash
#!/bin/sh
|
|
ARGS="$@"
|
|
|
|
OUTPUT=$(bash -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
|