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