go-toolbox/entrypoint.sh

24 lines
443 B
Bash
Raw Normal View History

#!/bin/bash
# Entrypoint that handles both GitHub/Gitea actions things and direct commands execution.
CMD=$*
# Just ensure we have PATH defined properly.
PATH="${PATH}:/usr/bin/:/usr/sbin/:/bin/:/usr/local/bin/:/opt/bin/"
if [ "${CMD}" == "" ]; then
CMD="${INPUT_COMMAND}"
fi
if [ "${CMD}" == "" ]; then
echo "! No command to run!"
exit 1
fi
echo "----------"
echo "Launching command:"
echo "${CMD}"
echo "----------"
2024-07-20 10:28:46 +05:00
${CMD}