go-toolbox/entrypoint.sh
Stanislav N. aka pztrn b4e9d9ec58
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
Try to use INPUT_COMMAND variable while at actions mode.
2024-07-19 23:54:51 +05:00

21 lines
327 B
Bash

#!/bin/bash
# Entrypoint that handles both GitHub/Gitea actions things and direct commands execution.
echo "----------"
echo "Launching command:"
echo "$@"
echo "----------"
CMD=$*
if [ "${CMD}" == "" ]; then
CMD="${INPUT_COMMAND}"
fi
if [ "${CMD}" == "" ]; then
echo "! No command to run!"
exit 1
fi
"${CMD}"