Files
common/distros/rockylinux/entrypoint.sh
2023-03-22 02:57:55 -07:00

18 lines
356 B
Bash

#!/bin/sh
WORKDIR=${WORKDIR:-.}
ls -al
cd "$WORKDIR"
ls -al
ARGS="$@"
OUTPUT=$(bash -c "$ARGS")
RESULT=$?
echo "$OUTPUT"
#Output multiline strings.
#https://trstringer.com/github-actions-multiline-strings/
OUTPUT="${OUTPUT//'%'/'%25'}"
OUTPUT="${OUTPUT//$'\n'/'%0A'}"
OUTPUT="${OUTPUT//$'\r'/'%0D'}"
echo "::set-output name=console::$OUTPUT"
exit $RESULT