Test
This commit is contained in:
25
dotnet/dotnet-10/entrypoint.sh
Normal file
25
dotnet/dotnet-10/entrypoint.sh
Normal file
@@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
COMMAND="$@"
|
||||
set -o pipefail
|
||||
|
||||
# Add root tools to Path.
|
||||
export PATH="$PATH:/root/.dotnet/tools/"
|
||||
|
||||
PROGRAM=${PROGRAM:-"dotnet"}
|
||||
exec 5>&1
|
||||
OUTPUT=$(bash -c "$PROGRAM $COMMAND" | tee /dev/fd/5)
|
||||
RESULT=$?
|
||||
|
||||
#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
|
||||
|
||||
echo "exitCode=$RESULT" >> "$GITHUB_OUTPUT"
|
||||
|
||||
if [[ "$CATCH_ERRORS" != "true" ]]; then
|
||||
exit $RESULT
|
||||
fi
|
||||
Reference in New Issue
Block a user